Mercurial > repos > public > sbplib_julia
diff test/testGrids.jl @ 688:e9e46a587370 feature/boundary_quads
Add eltype function to EquidistantGrids
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 12 Feb 2021 16:42:43 +0100 |
parents | 27dcac8fb350 |
children |
line wrap: on
line diff
--- a/test/testGrids.jl Tue Feb 09 14:40:26 2021 +0100 +++ b/test/testGrids.jl Fri Feb 12 16:42:43 2021 +0100 @@ -13,9 +13,12 @@ @test_throws DomainError EquidistantGrid(1,1.0,-1.0) @test EquidistantGrid(4,0.0,1.0) == EquidistantGrid((4,),(0.0,),(1.0,)) - # size - @test size(EquidistantGrid(4,0.0,1.0)) == (4,) - @test size(EquidistantGrid((5,3), (0.0,0.0), (2.0,1.0))) == (5,3) + @testset "Base" begin + @test eltype(EquidistantGrid(4,0.0,1.0)) == Float64 + @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) + end # dimension @test dimension(EquidistantGrid(4,0.0,1.0)) == 1