diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-04 11:33:22 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-13 10:33:18 -0700 |
commit | 7b041b123cb067d247a727bb3a4563bb2fc575eb (patch) | |
tree | cdf9ce1583ef6cc3a16970a7ad9a1527521ecf41 /platform/darwin/test/MGLStyleTests.mm | |
parent | de6c9b35f35f6ec0950529261b207d716c046beb (diff) | |
download | qtlocation-mapboxgl-7b041b123cb067d247a727bb3a4563bb2fc575eb.tar.gz |
[core, darwin] Object identity for MGLSource*, MGLStyleLayer*
All `MGLSource` pointers referencing the same logical source will now be object identical; similarly for `MGLStyleLayer`.
Diffstat (limited to 'platform/darwin/test/MGLStyleTests.mm')
-rw-r--r-- | platform/darwin/test/MGLStyleTests.mm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/darwin/test/MGLStyleTests.mm b/platform/darwin/test/MGLStyleTests.mm index 36772e556d..f9598a143d 100644 --- a/platform/darwin/test/MGLStyleTests.mm +++ b/platform/darwin/test/MGLStyleTests.mm @@ -148,6 +148,7 @@ MGLShapeSource *shapeSource = [[MGLShapeSource alloc] initWithIdentifier:@"shapeSource" shape:nil options:nil]; [self.style addSource:shapeSource]; XCTAssertEqual(self.style.sources.count, initialSources.count + 1); + XCTAssertEqual(shapeSource, [self.style sourceWithIdentifier:@"shapeSource"]); [self.style removeSource:shapeSource]; XCTAssertEqual(self.style.sources.count, initialSources.count); } @@ -238,6 +239,7 @@ MGLFillStyleLayer *fillLayer = [[MGLFillStyleLayer alloc] initWithIdentifier:@"fillLayer" source:shapeSource]; [self.style addLayer:fillLayer]; XCTAssertEqual(self.style.layers.count, initialLayers.count + 1); + XCTAssertEqual(fillLayer, [self.style layerWithIdentifier:@"fillLayer"]); [self.style removeLayer:fillLayer]; XCTAssertEqual(self.style.layers.count, initialLayers.count); } |