diff options
Diffstat (limited to 'platform/darwin/test/MGLFilterTests.mm')
-rw-r--r-- | platform/darwin/test/MGLFilterTests.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/darwin/test/MGLFilterTests.mm b/platform/darwin/test/MGLFilterTests.mm index 4b393fd1dc..e688d50583 100644 --- a/platform/darwin/test/MGLFilterTests.mm +++ b/platform/darwin/test/MGLFilterTests.mm @@ -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 = [[MGLShapeSource 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]; } |