comparison test/Grids/EquidistantGrid_test.jl @ 1115:6530fceef37c feature/grids

Rename dimension to dim
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Fri, 15 Jul 2022 09:41:58 +0200
parents e81b89ae17c4
children
comparison
equal deleted inserted replaced
1114:fc57804c9bf4 1115:6530fceef37c
17 @test eltype(EquidistantGrid((4,3),(0,0),(1,3))) == Int 17 @test eltype(EquidistantGrid((4,3),(0,0),(1,3))) == Int
18 @test size(EquidistantGrid(4,0.0,1.0)) == (4,) 18 @test size(EquidistantGrid(4,0.0,1.0)) == (4,)
19 @test size(EquidistantGrid((5,3), (0.0,0.0), (2.0,1.0))) == (5,3) 19 @test size(EquidistantGrid((5,3), (0.0,0.0), (2.0,1.0))) == (5,3)
20 end 20 end
21 21
22 # dimension 22 # dim
23 @test dimension(EquidistantGrid(4,0.0,1.0)) == 1 23 @test dim(EquidistantGrid(4,0.0,1.0)) == 1
24 @test dimension(EquidistantGrid((5,3), (0.0,0.0), (2.0,1.0))) == 2 24 @test dim(EquidistantGrid((5,3), (0.0,0.0), (2.0,1.0))) == 2
25 25
26 # spacing 26 # spacing
27 @test [spacing(EquidistantGrid(4,0.0,1.0))...] ≈ [(1. /3,)...] atol=5e-13 27 @test [spacing(EquidistantGrid(4,0.0,1.0))...] ≈ [(1. /3,)...] atol=5e-13
28 @test [spacing(EquidistantGrid((5,3), (0.0,-1.0), (2.0,1.0)))...] ≈ [(0.5, 1.)...] atol=5e-13 28 @test [spacing(EquidistantGrid((5,3), (0.0,-1.0), (2.0,1.0)))...] ≈ [(0.5, 1.)...] atol=5e-13
29 29