Skip to content

Commit 443006d

Browse files
yeesianvisr
authored andcommitted
add tests for interiorRing
1 parent ccfe4a7 commit 443006d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/test_geos_functions.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ end
7474
exterior = LibGEOS.exteriorRing(polygon)
7575
@test LibGEOS.getCoordinates(LibGEOS.getCoordSeq(exterior)) ==
7676
Vector{Float64}[[0, 0], [10, 0], [10, 10], [0, 10], [0, 0]]
77+
@test LibGEOS.getCoordinates(LibGEOS.getCoordSeq(LibGEOS.interiorRing(polygon, 1))) ==
78+
Vector{Float64}[[1, 8], [2, 8], [2, 9], [1, 9], [1, 8]]
79+
@test LibGEOS.getCoordinates(LibGEOS.getCoordSeq(LibGEOS.interiorRing(polygon, 2))) ==
80+
Vector{Float64}[[8, 1], [9, 1], [9, 2], [8, 2], [8, 1]]
81+
@test_throws ErrorException LibGEOS.interiorRing(polygon, 0)
82+
@test_throws ErrorException LibGEOS.interiorRing(polygon, 3)
7783
interiors = LibGEOS.interiorRings(polygon)
7884
@test LibGEOS.getCoordinates(LibGEOS.getCoordSeq(interiors[1])) ==
7985
Vector{Float64}[[1, 8], [2, 8], [2, 9], [1, 9], [1, 8]]

0 commit comments

Comments
 (0)