Skip to content

Commit 1d6591d

Browse files
committed
Fix tests for new syntax
1 parent b072c10 commit 1d6591d

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

test/test_wrappers.jl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ test_display(point, "Point{false, false}((1, 2))", "Point((1,2))")
3535
point_crs = GI.Point(point; crs=EPSG(4326))
3636
@test parent(point_crs) === parent(point)
3737
@test GI.crs(point_crs) === EPSG(4326)
38-
test_display(point_crs, "Point{false, false}((1, 2), crs = EPSG{1}((4326,)))", "Point((1,2))")
38+
test_display(point_crs, "Point{false, false}((1, 2), crs = \"EPSG:4326\")", "Point((1,2))")
3939

4040
# 3D Point
4141
pointz = GI.Point(1, 2, 3)
@@ -80,7 +80,7 @@ test_display(pointm, "Point{false, true}((1, 2, 3))", "Point((1,2,3))")
8080
pointm_crs = GI.Point((X=1, Y=2, M=3); crs=EPSG(4326))
8181
@test parent(pointm_crs) === parent(pointm)
8282
@test GI.crs(pointm_crs) === EPSG(4326)
83-
test_display(pointm_crs, "Point{false, true}((1, 2, 3), crs = EPSG{1}((4326,)))", "Point((1,2,3))")
83+
test_display(pointm_crs, "Point{false, true}((1, 2, 3), crs = \"EPSG:4326\")", "Point((1,2,3))")
8484

8585
# Forced measured point with a tuple
8686
pointtm = GI.Point{false,true}(1, 2, 3)
@@ -95,7 +95,7 @@ test_display(pointtm, "Point{false, true}((1, 2, 3))", "Point((1,2,3))")
9595
pointtm_crs = GI.Point{false,true}(1, 2, 3; crs=EPSG(4326))
9696
@test parent(pointtm_crs) === parent(pointtm)
9797
@test GI.crs(pointtm_crs) === EPSG(4326)
98-
test_display(pointtm_crs, "Point{false, true}((1, 2, 3), crs = EPSG{1}((4326,)))", "Point((1,2,3))")
98+
test_display(pointtm_crs, "Point{false, true}((1, 2, 3), crs = \"EPSG:4326\")", "Point((1,2,3))")
9999

100100
# Point made from an array
101101
pointa = GI.Point([1, 2])
@@ -149,7 +149,7 @@ test_display(line, "Line{false, false}([(1, 2), (3, 4)])", "Line([(1,2),(3,4)])"
149149
line_crs = GI.Line(line; crs=EPSG(4326))
150150
@test parent(line_crs) === parent(line)
151151
@test GI.crs(line_crs) === EPSG(4326)
152-
test_display(line_crs, "Line{false, false}([(1, 2), (3, 4)], crs = EPSG{1}((4326,)))", "Line([(1,2),(3,4)])")
152+
test_display(line_crs, "Line{false, false}([(1, 2), (3, 4)], crs = \"EPSG:4326\")", "Line([(1,2),(3,4)])")
153153

154154
# LineString
155155
linestring = GI.LineString([(1, 2), (3, 4)])
@@ -165,7 +165,7 @@ test_display(linestring, "LineString{false, false}([(1, 2), (3, 4)])", "LineStri
165165
linestring_crs = GI.LineString(linestring; crs=EPSG(4326))
166166
@test parent(linestring_crs) === parent(linestring)
167167
@test GI.crs(linestring_crs) === EPSG(4326)
168-
test_display(linestring_crs, "LineString{false, false}([(1, 2), (3, 4)], crs = EPSG{1}((4326,)))", "LineString([(1,2),(3,4)])")
168+
test_display(linestring_crs, "LineString{false, false}([(1, 2), (3, 4)], crs = \"EPSG:4326\")", "LineString([(1,2),(3,4)])")
169169

170170
# LinearRing
171171
linearring = GI.LinearRing([(1, 2), (3, 4), (5, 6), (1, 2)])
@@ -181,7 +181,7 @@ test_display(linearring, "LinearRing{false, false}([(1, 2), (3, 4), (5, 6), (1,
181181
linearring_crs = GI.LinearRing(linearring; crs=EPSG(4326))
182182
@test parent(linearring_crs) === parent(linearring)
183183
@test GI.crs(linearring_crs) === EPSG(4326)
184-
test_display(linearring_crs, "LinearRing{false, false}([(1, 2), (3, 4), (5, 6), (1, 2)], crs = EPSG{1}((4326,)))", "LinearRing([(1,2),(3,4),(5,6),(1,2)])")
184+
test_display(linearring_crs, "LinearRing{false, false}([(1, 2), (3, 4), (5, 6), (1, 2)], crs = \"EPSG:4326\")", "LinearRing([(1,2),(3,4),(5,6),(1,2)])")
185185

186186
# Polygon
187187
polygon = GI.Polygon([linearring, linearring])
@@ -201,7 +201,7 @@ test_display(polygon, "Polygon{false, false}([LinearRing([(1, 2), … (2) … ,
201201
polygon_crs = GI.Polygon(polygon; crs=EPSG(4326))
202202
@test parent(polygon_crs) === parent(polygon)
203203
@test GI.crs(polygon_crs) === EPSG(4326)
204-
test_display(polygon_crs, "Polygon{false, false}([LinearRing([(1, 2), … (2) … , (1, 2)]), LinearRing([(1, 2), … (2) … , (1, 2)])], crs = EPSG{1}((4326,)))",
204+
test_display(polygon_crs, "Polygon{false, false}([LinearRing([(1, 2), … (2) … , (1, 2)]), LinearRing([(1, 2), … (2) … , (1, 2)])], crs = \"EPSG:4326\")",
205205
"Polygon([LinearRing([(1,2),(3,4),(5,6),(1,2)]),LinearRing([(1,2),(3,4),(5,6),(1,2)])])")
206206
# Make sure `linestring` is also ok in polygons
207207
polygon = GI.Polygon([linestring, linestring])
@@ -231,7 +231,7 @@ test_display(multipoint, "MultiPoint{false, false}([(1, 2), (3, 4), (3, 2), (1,
231231
multipoint_crs = GI.MultiPoint(multipoint; crs=EPSG(4326))
232232
@test parent(multipoint_crs) == parent(multipoint)
233233
@test GI.crs(multipoint_crs) === EPSG(4326)
234-
test_display(multipoint_crs, "MultiPoint{false, false}([(1, 2), (3, 4), … (2) … , (7, 8), (9, 10)], crs = EPSG{1}((4326,)))", "MultiPoint([(1,2),(3,4),(3,2),(1,4),(7,8),(9,10)])")
234+
test_display(multipoint_crs, "MultiPoint{false, false}([(1, 2), (3, 4), (3, 2), … (1) … , (7, 8), (9, 10)], crs = \"EPSG:4326\")", "MultiPoint([(1,2),(3,4),(3,2),(1,4),(7,8),(9,10)])")
235235

236236
# GeometryCollection
237237
geoms = [line, linestring, linearring, multipoint, (1, 2)]
@@ -248,7 +248,7 @@ test_display(collection, "GeometryCollection{false, false}([Line([(1, 2), (3, 4)
248248
collection_crs = GI.GeometryCollection(collection; crs=EPSG(4326))
249249
@test parent(collection_crs) == parent(collection)
250250
@test GI.crs(collection_crs) === EPSG(4326)
251-
test_display(collection_crs, "GeometryCollection{false, false}([Line([(1, 2), (3, 4)]), … (3) … , (1, 2)], crs = EPSG{1}((4326,)))",
251+
test_display(collection_crs, "GeometryCollection{false, false}([Line([(1, 2), (3, 4)]), … (3) … , (1, 2)], crs = \"EPSG:4326\")",
252252
"GeometryCollection([Line([(1,2),(3,4)]),LineString([(1,2),(3,4)]),…(2)…,(1,2)])")
253253

254254
# MultiCurve
@@ -267,7 +267,7 @@ test_display(multicurve, "MultiCurve{false, false}([LineString([(1, 2), (3, 4)])
267267
multicurve_crs = GI.MultiCurve(multicurve; crs=EPSG(4326))
268268
@test parent(multicurve_crs) == parent(multicurve)
269269
@test GI.crs(multicurve_crs) === EPSG(4326)
270-
test_display(multicurve_crs, "MultiCurve{false, false}([LineString([(1, 2), (3, 4)]), LinearRing([(1, 2), … (2) … , (1, 2)])], crs = EPSG{1}((4326,)))",
270+
test_display(multicurve_crs, "MultiCurve{false, false}([LineString([(1, 2), (3, 4)]), LinearRing([(1, 2), … (2) … , (1, 2)])], crs = \"EPSG:4326\")",
271271
"MultiCurve([LineString([(1,2),(3,4)]),LinearRing([(1,2),(3,4),…(1)…,(1,2)])])")
272272

273273
# MultiPolygon
@@ -288,7 +288,7 @@ test_display(multipolygon, "MultiPolygon{false, false}([Polygon([LinearRing([(1,
288288
multipolygon_crs = GI.MultiPolygon(multipolygon; crs=EPSG(4326))
289289
@test parent(multipolygon_crs) == parent(multipolygon)
290290
@test GI.crs(multipolygon_crs) === EPSG(4326)
291-
test_display(multipolygon_crs, "MultiPolygon{false, false}([Polygon([LinearRing([(1, 2), … (2) … , (1, 2)]), LinearRing([(1, 2), … (2) … , (1, 2)])])], crs = EPSG{1}((4326,)))",
291+
test_display(multipolygon_crs, "MultiPolygon{false, false}([Polygon([LinearRing([(1, 2), … (2) … , (1, 2)]), LinearRing([(1, 2), … (2) … , (1, 2)])])], crs = \"EPSG:4326\")",
292292
"MultiPolygon([Polygon([LinearRing([(1,2),…(2)…,(1,2)]),LinearRing([(1,2),…(2)…,(1,2)])])])")
293293

294294
# PolyhedralSurface
@@ -308,7 +308,7 @@ test_display(polyhedralsurface, "PolyhedralSurface{false, false}([Polygon([Linea
308308
polyhedralsurface_crs = GI.PolyhedralSurface(polyhedralsurface; crs=EPSG(4326))
309309
@test parent(polyhedralsurface_crs) == parent(polyhedralsurface)
310310
@test GI.crs(polyhedralsurface_crs) === EPSG(4326)
311-
test_display(polyhedralsurface_crs, "PolyhedralSurface{false, false}([Polygon([LinearRing([(1, 2), … (2) … , (1, 2)]), LinearRing([(1, 2), … (2) … , (1, 2)])]), Polygon([LinearRing([(1, 2), … (2) … , (1, 2)]), LinearRing([(1, 2), … (2) … , (1, 2)])])], crs = EPSG{1}((4326,)))",
311+
test_display(polyhedralsurface_crs, "PolyhedralSurface{false, false}([Polygon([LinearRing([(1, 2), … (2) … , (1, 2)]), LinearRing([(1, 2), … (2) … , (1, 2)])]), Polygon([LinearRing([(1, 2), … (2) … , (1, 2)]), LinearRing([(1, 2), … (2) … , (1, 2)])])], crs = \"EPSG:4326\")",
312312
"PolyhedralSurface([Polygon([LinearRing([(1,2),…(2)…,(1,2)]),LinearRing([(1,2),…(2)…,(1,2)])]),Polygon([LinearRing([(1,2),…(2)…,(1,2)]),LinearRing([(1,2),…(2)…,(1,2)])])])")
313313

314314
# Round-trip coordinates
@@ -338,7 +338,7 @@ test_display(feature, "Feature(MultiPolygon{false, false}([Polygon([LinearRing([
338338
feature = GI.Feature(multipolygon;
339339
properties=(x=1, y=2, z=3), crs=EPSG(4326), extent=extent(multipolygon)
340340
)
341-
test_display(feature, "Feature(MultiPolygon{false, false}([Polygon([LinearRing([[1, 2], [3, 4], [3, 2], [1, 4]])])]), properties = (x = 1, y = 2, z = 3), crs = EPSG{1}((4326,)))",
341+
test_display(feature, "Feature(MultiPolygon{false, false}([Polygon([LinearRing([[1, 2], [3, 4], [3, 2], [1, 4]])])]), properties = (x = 1, y = 2, z = 3), crs = \"EPSG:4326\")",
342342
"Feature(MultiPolygon([Polygon([LinearRing([[1,2],[3,4],[3,2],[1,4]])])]),properties=(x=1,y=2,z=3))")
343343
@test GI.geometry(feature) === multipolygon
344344
@test GI.properties(feature) === (x=1, y=2, z=3)
@@ -359,7 +359,7 @@ fc = GI.FeatureCollection(fc_unwrapped.parent; crs=EPSG(4326), extent=GI.extent(
359359
@test GI.extent(fc) == fc.extent
360360
@test first(GI.getfeature(fc)) == GI.getfeature(fc, 1) === feature
361361
@test GI.testfeaturecollection(fc)
362-
test_display(fc, "FeatureCollection([Feature(MultiPolygon{false, false}([Polygon([LinearRing([[1, 2], [3, 4], [3, 2], [1, 4]])])]), properties = (x = 1, y = 2, z = 3), crs = EPSG{1}((4326,)))], crs = EPSG{1}((4326,)), extent = Extent(X = (1, 3), Y = (2, 4)))",
362+
test_display(fc, "FeatureCollection([Feature(MultiPolygon{false, false}([Polygon([LinearRing([[1, 2], [3, 4], [3, 2], [1, 4]])])]), properties = (x = 1, y = 2, z = 3), crs = \"EPSG:4326\")], crs = \"EPSG:4326\", extent = Extent(X = (1, 3), Y = (2, 4)))",
363363
"FeatureCollection([Feature(MultiPolygon([Polygon([LinearRing([[1,2],[3,4],[3,2],[1,4]])])]),properties=(x=1,y=2,z=3))])")
364364
@test_throws ArgumentError GI.FeatureCollection([1])
365365
vecfc = GI.FeatureCollection([(geometry=(1,2), a=1, b=2)])

0 commit comments

Comments
 (0)