From 640529bec98a990872c7159ed06b70028ea0c9c9 Mon Sep 17 00:00:00 2001 From: Kevin-Mattheus-Moerman Date: Thu, 9 May 2024 09:33:49 +0100 Subject: [PATCH] Fixing geosphere testing --- test/runtests.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index bb45d4c..0405b10 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1545,12 +1545,12 @@ end F, V = geosphere(n, r) ind = round.(Int64,range(1,length(V),6)) # Sample indices @test F isa Vector{TriangleFace{Int64}} - @test length(F) == 4^n*20 - @test V isa Vector{Point3{Float64}} - @test isapprox(V[ind],Point{3, Float64}[[0.0, -0.5257311121191336, -0.85065080835204], - [-0.5877852522924731, -0.6881909602355868, -0.42532540417602], [0.26286555605956685, -0.16245984811645317, -0.9510565162951538], - [-0.25989191300775444, 0.43388856455269487, 0.8626684804161864], [0.9129824929322992, 0.3996070517018512, 0.08232358003196016], - [0.13279247682790243, -0.2201170274732924, 0.9663925974024391]], atol=eps_level) + @test length(F) == 4^n*20 # 20 since the icosahedron is the start geometry + @test V isa Vector{Point{3,Float64}} + @test isapprox(V[ind],GeometryBasics.Point{3, Float64}[[0.0, -0.5257311121191336, -0.85065080835204], + [-0.25989191300775444, -0.43388856455269487, 0.8626684804161864], [0.5133754412304479, 0.6465777917977317, 0.5642542117657715], + [0.21302286564912973, -0.5712516591357086, -0.7926492292592814], [0.840177885327139, -0.5192584897281833, 0.15643446504023087], + [-0.7838430424199713, 0.08108629344330351, -0.6156420208736807]], atol=eps_level) @test isapprox(norm.(V),fill(r,length(V))) # Test radii end