Mercurial > repos > public > sbplib_julia
diff test/Grids/equidistant_grid_test.jl @ 1267:30729cba1095 refactor/grids
Fix some broken tests in equidistant_grid_test.jl
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 24 Feb 2023 21:48:01 +0100 |
parents | a4834779cd6d |
children | 75a65db29be1 |
line wrap: on
line diff
--- a/test/Grids/equidistant_grid_test.jl Fri Feb 24 21:42:28 2023 +0100 +++ b/test/Grids/equidistant_grid_test.jl Fri Feb 24 21:48:01 2023 +0100 @@ -95,7 +95,7 @@ @testset "Base" begin @test eltype(equidistant_grid(4,0.0,1.0)) == Float64 - @test_broken eltype(equidistant_grid((4,3),(0,0),(1,3))) == AbstractVector{Float64} + @test eltype(equidistant_grid((4,3),(0,0),(1,3))) <: AbstractVector{Float64} @test size(equidistant_grid(4,0.0,1.0)) == (4,) @test size(equidistant_grid((5,3), (0.0,0.0), (2.0,1.0))) == (5,3) @test ndims(equidistant_grid(4,0.0,1.0)) == 1 @@ -104,15 +104,14 @@ @testset "getindex" begin g = equidistant_grid((5,3), (-1.0,0.0), (0.0,7.11)) - # gp = collect(g); - gp = rand(size(g)...) + gp = collect(g); p = [(-1.,0.) (-1.,7.11/2) (-1.,7.11); (-0.75,0.) (-0.75,7.11/2) (-0.75,7.11); (-0.5,0.) (-0.5,7.11/2) (-0.5,7.11); (-0.25,0.) (-0.25,7.11/2) (-0.25,7.11); (0.,0.) (0.,7.11/2) (0.,7.11)] for i ∈ eachindex(gp) - @test_broken [gp[i]...] ≈ [p[i]...] atol=5e-13 + @test [gp[i]...] ≈ [p[i]...] atol=5e-13 end end end