Mercurial > repos > public > sbplib_julia
diff test/Grids/equidistant_grid_test.jl @ 1128:dfbd62c7eb09 feature/grids
Rename dim to ndims in Grids.jl
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Wed, 05 Oct 2022 22:00:30 +0200 |
parents | b9c6b0d8f0fa |
children | 9275d95e2d90 102ebdaf7c11 |
line wrap: on
line diff
--- a/test/Grids/equidistant_grid_test.jl Wed Oct 05 21:26:37 2022 +0200 +++ b/test/Grids/equidistant_grid_test.jl Wed Oct 05 22:00:30 2022 +0200 @@ -17,12 +17,10 @@ @test eltype(EquidistantGrid((4,3),(0,0),(1,3))) == Int @test size(EquidistantGrid(4,0.0,1.0)) == (4,) @test size(EquidistantGrid((5,3), (0.0,0.0), (2.0,1.0))) == (5,3) + @test ndims(EquidistantGrid(4,0.0,1.0)) == 1 + @test ndims(EquidistantGrid((5,3), (0.0,0.0), (2.0,1.0))) == 2 end - # dim - @test dim(EquidistantGrid(4,0.0,1.0)) == 1 - @test dim(EquidistantGrid((5,3), (0.0,0.0), (2.0,1.0))) == 2 - @testset "spacing" begin @test [spacing(EquidistantGrid(4,0.0,1.0))...] ≈ [(1. /3,)...] atol=5e-13 @test [spacing(EquidistantGrid((5,3), (0.0,-1.0), (2.0,1.0)))...] ≈ [(0.5, 1.)...] atol=5e-13