diff test/Grids/equidistant_grid_test.jl @ 1825:98ae79eb0709 refactor/grids/iterable_boundary_indices

Refine tests
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 17 Sep 2024 09:12:36 +0200
parents 7a2375080287
children 871f3f1decea
line wrap: on
line diff
--- a/test/Grids/equidistant_grid_test.jl	Wed Jun 19 11:16:42 2024 +0200
+++ b/test/Grids/equidistant_grid_test.jl	Tue Sep 17 09:12:36 2024 +0200
@@ -70,18 +70,16 @@
 
     @testset "boundary_indices" begin
         g = EquidistantGrid(0:0.1:1)
-        @test collect(boundary_indices(g, Lower())) == [(1,)]
-        @test collect(boundary_indices(g, Upper())) == [(11,)]
-
+        @test boundary_indices(g, Lower()) == 1
+        @test boundary_indices(g, Upper()) == 11
 
-        gf = collect(1:length(g))
-        @test gf[boundary_indices(g, Lower()] == gf[1]
-        @test gf[boundary_indices(g, Upper()] == gf[11]
+        gf = collect(g)
+        @test gf[boundary_indices(g, Lower())] == gf[1]
+        @test gf[boundary_indices(g, Upper())] == gf[11]
 
         g = EquidistantGrid(2:0.1:10)
-        @test collect(boundary_indices(g, Lower())) == [(1,)]
-        @test collect(boundary_indices(g, Upper())) == [(81,)]
-
+        @test boundary_indices(g, Lower()) == 1
+        @test boundary_indices(g, Upper()) == 81
     end
 
     @testset "refine" begin