From ea5d1a8c1d8ca8d814079f3771da1fa70bf40ddf Mon Sep 17 00:00:00 2001 From: Elias Carvalho Date: Tue, 12 Nov 2024 13:46:44 -0300 Subject: [PATCH] Fix tests --- src/transforms.jl | 2 +- test/hulls.jl | 4 ++-- test/meshes.jl | 2 +- test/testutils.jl | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/transforms.jl b/src/transforms.jl index dfc64048a..be49b250a 100644 --- a/src/transforms.jl +++ b/src/transforms.jl @@ -79,7 +79,7 @@ applycoord(t::CoordinateTransform, g::TransformedGeometry) = TransformedGeometry applycoord(t::CoordinateTransform, m::TransformedMesh) = TransformedMesh(m, t) # special treatment for lists of geometries -applycoord(t::CoordinateTransform, g::NTuple{<:Any,<:Geometry}) = map(gᵢ -> applycoord(t, gᵢ), g) +applycoord(t::CoordinateTransform, g::StaticVector{<:Any,<:Geometry}) = map(gᵢ -> applycoord(t, gᵢ), g) applycoord(t::CoordinateTransform, g::AbstractVector{<:Geometry}) = [applycoord(t, gᵢ) for gᵢ in g] applycoord(t::CoordinateTransform, g::CircularVector{<:Geometry}) = CircularVector([applycoord(t, gᵢ) for gᵢ in g]) diff --git a/test/hulls.jl b/test/hulls.jl index 968c499e8..dfa4476cc 100644 --- a/test/hulls.jl +++ b/test/hulls.jl @@ -90,11 +90,11 @@ # degenerate cases points = [cart(0, 0), cart(1, 0), cart(2, 0)] chull = hull(points, method) - @test vertices(chull) == (cart(0, 0), cart(2, 0)) + @test vertices(chull) == SVector(cart(0, 0), cart(2, 0)) points = [cart(0, 0), cart(1, 0), cart(2, 0), cart(10, 0), cart(100, 0)] chull = hull(points, method) - @test vertices(chull) == (cart(0, 0), cart(100, 0)) + @test vertices(chull) == SVector(cart(0, 0), cart(100, 0)) # partially collinear points = [ diff --git a/test/meshes.jl b/test/meshes.jl index 49f6fcca7..ce1070f8b 100644 --- a/test/meshes.jl +++ b/test/meshes.jl @@ -244,7 +244,7 @@ end @test spacing(grid) == (T(5) * u"m", T(5) * u"m", T(5) * u"m") @test nelements(grid) == 20 * 10 * 5 @test eltype(grid) <: Hexahedron - @test vertices(grid[1]) == ( + @test vertices(grid[1]) == SVector( cart(0, 0, 0), cart(5, 0, 0), cart(5, 5, 0), diff --git a/test/testutils.jl b/test/testutils.jl index d1f2f3530..d12c2f374 100644 --- a/test/testutils.jl +++ b/test/testutils.jl @@ -114,7 +114,7 @@ withprecision(T, v::Vec) = numconvert.(T, v) withprecision(T, p::Point) = Meshes.withcrs(p, withprecision(T, to(p))) withprecision(T, len::Meshes.Len) = numconvert(T, len) withprecision(T, lens::NTuple{Dim,Meshes.Len}) where {Dim} = numconvert.(T, lens) -withprecision(T, geoms::NTuple{Dim,<:Geometry}) where {Dim} = withprecision.(T, geoms) +withprecision(T, geoms::StaticVector{Dim,<:Geometry}) where {Dim} = withprecision.(T, geoms) withprecision(T, geoms::AbstractVector{<:Geometry}) = [withprecision(T, g) for g in geoms] withprecision(T, geoms::CircularVector{<:Geometry}) = CircularVector([withprecision(T, g) for g in geoms]) @generated function withprecision(T, g::G) where {G<:Meshes.GeometryOrDomain}