Skip to content

Commit 43860fa

Browse files
authored
Add tests for MultiLineStringMeta
1 parent 810e4a8 commit 43860fa

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/runtests.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,17 @@ using GeometryBasics: attributes
9999
@test metafree(pm) === p
100100
@test propertynames(pm) == (:position, :a, :b)
101101
end
102+
103+
@testset "MultiLineString with metadata" begin
104+
linestring1 = LineString(Point{2, Int}[(10, 10), (20, 20), (10, 40)])
105+
linestring2 = LineString(Point{2, Int}[(40, 40), (30, 30), (40, 20), (30, 10)])
106+
multilinestring = MultiLineString([linestring1, linestring2])
107+
multilinestringmeta = MultiLineStringMeta([linestring1, linestring2]; boundingbox = Rect(1.0, 1.0, 2.0, 2.0))
108+
@test multilinestringmeta isa AbstractVector
109+
@test meta(multilinestringmeta) === (boundingbox = GeometryBasics.HyperRectangle{2,Float64}([1.0, 1.0], [2.0, 2.0]),)
110+
@test metafree(multilinestringmeta) == multilinestring
111+
@test propertynames(multilinestringmeta) == (:linestrings, :boundingbox)
112+
end
102113
end
103114

104115
@testset "view" begin

0 commit comments

Comments
 (0)