diff options
-rw-r--r-- | platform/darwin/test/MGLShapeSourceTests.mm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/platform/darwin/test/MGLShapeSourceTests.mm b/platform/darwin/test/MGLShapeSourceTests.mm index efff4b393e..2662d4b6f0 100644 --- a/platform/darwin/test/MGLShapeSourceTests.mm +++ b/platform/darwin/test/MGLShapeSourceTests.mm @@ -37,6 +37,19 @@ XCTAssertNil(source.shape); } +- (void)testUnclusterableShape { + NSDictionary *options = @{ + MGLShapeSourceOptionClustered: @YES, + }; + + MGLShapeSource *source = [[MGLShapeSource alloc] initWithIdentifier:@"id" shape:[[MGLPointFeature alloc] init] options:options]; + XCTAssertTrue([source.shape isKindOfClass:[MGLPointFeature class]]); + + MGLShapeCollectionFeature *feature = [MGLShapeCollectionFeature shapeCollectionWithShapes:@[]]; + source = [[MGLShapeSource alloc] initWithIdentifier:@"id" shape:feature options:options]; + XCTAssertTrue([source.shape isKindOfClass:[MGLShapeCollectionFeature class]]); +} + - (void)testMGLShapeSourceWithDataMultipleFeatures { NSString *geoJSON = @"{\"type\": \"FeatureCollection\",\"features\": [{\"type\": \"Feature\",\"properties\": {},\"geometry\": {\"type\": \"LineString\",\"coordinates\": [[-107.75390625,40.329795743702064],[-104.34814453125,37.64903402157866]]}}]}"; |