summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLFeatureTests.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/test/MGLFeatureTests.mm')
-rw-r--r--platform/darwin/test/MGLFeatureTests.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/darwin/test/MGLFeatureTests.mm b/platform/darwin/test/MGLFeatureTests.mm
index efc30d307b..91ec9d429e 100644
--- a/platform/darwin/test/MGLFeatureTests.mm
+++ b/platform/darwin/test/MGLFeatureTests.mm
@@ -322,6 +322,15 @@
@[@(coord2.longitude), @(coord2.latitude)]]}
]};
XCTAssertEqualObjects(geoJSONFeature[@"geometry"], expectedGeometry);
+
+ // When the shape collection is created with an empty array of shapes
+ shapeCollectionFeature = [MGLShapeCollectionFeature shapeCollectionWithShapes:@[]];
+
+ // it has the correct (empty) geometry
+ geoJSONFeature = [shapeCollectionFeature geoJSONDictionary];
+ expectedGeometry = @{@"type": @"GeometryCollection",
+ @"geometries": @[]};
+ XCTAssertEqualObjects(geoJSONFeature[@"geometry"], expectedGeometry);
}
@end