summaryrefslogtreecommitdiff
path: root/platform/ios
diff options
context:
space:
mode:
authordanswick <dan.swick@gmail.com>2019-09-18 11:39:43 -0700
committerdanswick <dan.swick@gmail.com>2019-09-18 11:39:43 -0700
commit46914ecff8b3f2a1945b33358a879c2aac074f17 (patch)
tree697cf276a43ae4c18c0ad7029c00e7d771448822 /platform/ios
parent47ea84ad1a5fed3431d026c5765c17c507d4623e (diff)
parent8805defe57aa0d8886c7828d39b1b9b1f17f21b8 (diff)
downloadqtlocation-mapboxgl-upstream/android-docs-automation.tar.gz
Merge branch 'master' into android-docs-automationupstream/android-docs-automation
Diffstat (limited to 'platform/ios')
-rw-r--r--platform/ios/CHANGELOG.md1
-rw-r--r--platform/ios/Integration Tests/MGLStyleLayerIntegrationTests.m16
2 files changed, 9 insertions, 8 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index f2394d1b84..089cc18606 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -7,6 +7,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
### Styles and rendering
* Added an `-[MGLMapSnapshotter startWithOverlayHandler:completionHandler:]` method to provide the snapshot's current `CGContext` in order to perform custom drawing on `MGLMapSnapShot` objects. ([#15530](https://github.com/mapbox/mapbox-gl-native/pull/15530))
* Fixed an issue that `maxzoom` in style `Sources` option was ignored when URL resource is provided. It may cause problems such as extra tiles downloading at higher zoom level than `maxzoom`, or problems that wrong setting of `overscaledZ` in `OverscaledTileID` that will be passed to `SymbolLayout`, leading wrong rendering appearance. ([#15581](https://github.com/mapbox/mapbox-gl-native/pull/15581))
+* Fixed an assertion hit caused by possibility of adding a layer to an incompatible source. ([#15644](https://github.com/mapbox/mapbox-gl-native/pull/15644))
### Performance improvements
diff --git a/platform/ios/Integration Tests/MGLStyleLayerIntegrationTests.m b/platform/ios/Integration Tests/MGLStyleLayerIntegrationTests.m
index c018c457b9..f5f2f957d3 100644
--- a/platform/ios/Integration Tests/MGLStyleLayerIntegrationTests.m
+++ b/platform/ios/Integration Tests/MGLStyleLayerIntegrationTests.m
@@ -82,31 +82,31 @@
// Testing generated layers
MGLLineStyleLayer *lineLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"lineLayerID" source:source];
- MGLRasterStyleLayer *rasterLayer = [[MGLRasterStyleLayer alloc] initWithIdentifier:@"rasterLayerID" source:source];
+ MGLCircleStyleLayer *circleLayer = [[MGLCircleStyleLayer alloc] initWithIdentifier:@"circleLayerID" source:source];
[self.mapView.style addSource:source];
[self.mapView.style addLayer:lineLayer];
- [self.mapView.style addLayer:rasterLayer];
+ [self.mapView.style addLayer:circleLayer];
XCTAssertNoThrow(lineLayer.isVisible);
- XCTAssertNoThrow(rasterLayer.isVisible);
+ XCTAssertNoThrow(circleLayer.isVisible);
XCTAssert(![source.description containsString:@"<unknown>"]);
XCTAssert(![lineLayer.description containsString:@"<unknown>"]);
- XCTAssert(![rasterLayer.description containsString:@"<unknown>"]);
+ XCTAssert(![circleLayer.description containsString:@"<unknown>"]);
self.styleLoadingExpectation = nil;
[self.mapView setStyleURL:[[NSBundle bundleForClass:[self class]] URLForResource:@"one-liner" withExtension:@"json"]];
[self waitForMapViewToFinishLoadingStyleWithTimeout:10];
-
+
XCTAssert([source.description containsString:@"<unknown>"]);
XCTAssert([lineLayer.description containsString:@"<unknown>"]);
- XCTAssert([rasterLayer.description containsString:@"<unknown>"]);
+ XCTAssert([circleLayer.description containsString:@"<unknown>"]);
XCTAssertThrowsSpecificNamed(lineLayer.isVisible, NSException, MGLInvalidStyleLayerException, @"Layer should raise an exception if its core peer got invalidated");
- XCTAssertThrowsSpecificNamed(rasterLayer.isVisible, NSException, MGLInvalidStyleLayerException, @"Layer should raise an exception if its core peer got invalidated");
+ XCTAssertThrowsSpecificNamed(circleLayer.isVisible, NSException, MGLInvalidStyleLayerException, @"Layer should raise an exception if its core peer got invalidated");
XCTAssertThrowsSpecificNamed([self.mapView.style removeLayer:lineLayer], NSException, NSInvalidArgumentException, @"Style should raise an exception when attempting to remove an invalid layer (e.g. if its core peer got invalidated)");
- XCTAssertThrowsSpecificNamed([self.mapView.style removeLayer:rasterLayer], NSException, NSInvalidArgumentException, @"Style should raise an exception when attempting to remove an invalid layer (e.g. if its core peer got invalidated)");
+ XCTAssertThrowsSpecificNamed([self.mapView.style removeLayer:circleLayer], NSException, NSInvalidArgumentException, @"Style should raise an exception when attempting to remove an invalid layer (e.g. if its core peer got invalidated)");
}
@end