summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLFilterTests.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/test/MGLFilterTests.mm')
-rw-r--r--platform/darwin/test/MGLFilterTests.mm8
1 files changed, 6 insertions, 2 deletions
diff --git a/platform/darwin/test/MGLFilterTests.mm b/platform/darwin/test/MGLFilterTests.mm
index b18400f83a..e688d50583 100644
--- a/platform/darwin/test/MGLFilterTests.mm
+++ b/platform/darwin/test/MGLFilterTests.mm
@@ -5,7 +5,7 @@
@interface MGLFilterTests : MGLStyleLayerTests {
- MGLGeoJSONSource *source;
+ MGLShapeSource *source;
MGLLineStyleLayer *layer;
}
@end
@@ -18,7 +18,11 @@
NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"amsterdam" ofType:@"geojson"];
NSURL *url = [NSURL fileURLWithPath:filePath];
NSData *geoJSONData = [NSData dataWithContentsOfURL:url];
- source = [[MGLGeoJSONSource alloc] initWithIdentifier:@"test-source" geoJSONData:geoJSONData options:nil];
+ NSError *error;
+ MGLShape *shape = [MGLShape shapeWithData:geoJSONData encoding:NSUTF8StringEncoding error:&error];
+ XCTAssertNil(error);
+ XCTAssertNotNil(shape);
+ source = [[MGLShapeSource alloc] initWithIdentifier:@"test-source" shape:shape options:nil];
[self.mapView.style addSource:source];
layer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"test-layer" source:source];
}