comparison test/Grids/equidistant_grid_test.jl @ 1253:ff8f335c32d1 refactor/grids

Fix indexing with begin and end for EquidistantGrid
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 22 Feb 2023 12:53:16 +0100
parents c150eabaf656
children 1989d432731a
comparison
equal deleted inserted replaced
1252:c150eabaf656 1253:ff8f335c32d1
37 g = EquidistantGrid(0:0.1:10) 37 g = EquidistantGrid(0:0.1:10)
38 @test g[1] == 0.0 38 @test g[1] == 0.0
39 @test g[5] == 0.4 39 @test g[5] == 0.4
40 @test g[101] == 10.0 40 @test g[101] == 10.0
41 41
42 @test_broken g[begin] == 0.0 42 @test g[begin] == 0.0
43 @test_broken g[end] == 10.0 43 @test g[end] == 10.0
44 end 44 end
45 45
46 @testset "boundary_identifiers" begin 46 @testset "boundary_identifiers" begin
47 g = EquidistantGrid(0:0.1:10) 47 g = EquidistantGrid(0:0.1:10)
48 @test boundary_identifiers(g) == (Lower(), Upper()) 48 @test boundary_identifiers(g) == (Lower(), Upper())