Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eliascarv committed Nov 12, 2024
1 parent 084f55e commit ea5d1a8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/transforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down
4 changes: 2 additions & 2 deletions test/hulls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion test/meshes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion test/testutils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit ea5d1a8

Please sign in to comment.