diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-12-20 12:41:40 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-12-20 12:41:40 -0800 |
commit | a6b1773a44d4ef086eb30967cb041cb64312650a (patch) | |
tree | ec293e38c9ec3ef1f32195f0d5071f73b88497ed /platform/darwin/test/MGLFillStyleLayerTests.m | |
parent | dad57df38ef86363da9bff2e62f3fddc5688f0cf (diff) | |
parent | e2fde9cc4eff3de5ab2f513d0c24ad5471d147e6 (diff) | |
download | qtlocation-mapboxgl-a6b1773a44d4ef086eb30967cb041cb64312650a.tar.gz |
Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.5-master
Also reran make style-code and manually discarded anything related to fill extrusion layers.
Diffstat (limited to 'platform/darwin/test/MGLFillStyleLayerTests.m')
-rw-r--r-- | platform/darwin/test/MGLFillStyleLayerTests.m | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/platform/darwin/test/MGLFillStyleLayerTests.m b/platform/darwin/test/MGLFillStyleLayerTests.m index 87846302ea..7d51c15cf4 100644 --- a/platform/darwin/test/MGLFillStyleLayerTests.m +++ b/platform/darwin/test/MGLFillStyleLayerTests.m @@ -8,15 +8,19 @@ @implementation MGLFillLayerTests ++ (NSString *)layerType { + return @"fill"; +} + - (void)testFillLayer { NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"amsterdam" ofType:@"geojson"]; NSURL *url = [NSURL fileURLWithPath:filePath]; - MGLGeoJSONSource *source = [[MGLGeoJSONSource alloc] initWithIdentifier:@"sourceID" URL:url options:nil]; + MGLShapeSource *source = [[MGLShapeSource alloc] initWithIdentifier:@"sourceID" URL:url options:nil]; [self.mapView.style addSource:source]; MGLFillStyleLayer *layer = [[MGLFillStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; [self.mapView.style addLayer:layer]; - layer.fillAntialias = [MGLRuntimeStylingHelper testBool]; + layer.fillAntialiased = [MGLRuntimeStylingHelper testBool]; layer.fillColor = [MGLRuntimeStylingHelper testColor]; layer.fillOpacity = [MGLRuntimeStylingHelper testNumber]; layer.fillOutlineColor = [MGLRuntimeStylingHelper testColor]; @@ -26,7 +30,7 @@ MGLFillStyleLayer *gLayer = (MGLFillStyleLayer *)[self.mapView.style layerWithIdentifier:@"layerID"]; XCTAssertTrue([gLayer isKindOfClass:[MGLFillStyleLayer class]]); - XCTAssertEqualObjects(gLayer.fillAntialias, [MGLRuntimeStylingHelper testBool]); + XCTAssertEqualObjects(gLayer.fillAntialiased, [MGLRuntimeStylingHelper testBool]); XCTAssertEqualObjects(gLayer.fillColor, [MGLRuntimeStylingHelper testColor]); XCTAssertEqualObjects(gLayer.fillOpacity, [MGLRuntimeStylingHelper testNumber]); XCTAssertEqualObjects(gLayer.fillOutlineColor, [MGLRuntimeStylingHelper testColor]); @@ -35,7 +39,7 @@ XCTAssert([gLayer.fillTranslateAnchor isKindOfClass:[MGLStyleConstantValue class]]); XCTAssertEqualObjects(gLayer.fillTranslateAnchor, [MGLRuntimeStylingHelper testEnum:MGLFillTranslateAnchorViewport type:@encode(MGLFillTranslateAnchor)]); - layer.fillAntialias = [MGLRuntimeStylingHelper testBoolFunction]; + layer.fillAntialiased = [MGLRuntimeStylingHelper testBoolFunction]; layer.fillColor = [MGLRuntimeStylingHelper testColorFunction]; layer.fillOpacity = [MGLRuntimeStylingHelper testNumberFunction]; layer.fillOutlineColor = [MGLRuntimeStylingHelper testColorFunction]; @@ -43,7 +47,7 @@ layer.fillTranslate = [MGLRuntimeStylingHelper testOffsetFunction]; layer.fillTranslateAnchor = [MGLRuntimeStylingHelper testEnumFunction:MGLFillTranslateAnchorViewport type:@encode(MGLFillTranslateAnchor)]; - XCTAssertEqualObjects(gLayer.fillAntialias, [MGLRuntimeStylingHelper testBoolFunction]); + XCTAssertEqualObjects(gLayer.fillAntialiased, [MGLRuntimeStylingHelper testBoolFunction]); XCTAssertEqualObjects(gLayer.fillColor, [MGLRuntimeStylingHelper testColorFunction]); XCTAssertEqualObjects(gLayer.fillOpacity, [MGLRuntimeStylingHelper testNumberFunction]); XCTAssertEqualObjects(gLayer.fillOutlineColor, [MGLRuntimeStylingHelper testColorFunction]); @@ -52,4 +56,14 @@ XCTAssertEqualObjects(gLayer.fillTranslateAnchor, [MGLRuntimeStylingHelper testEnumFunction:MGLFillTranslateAnchorViewport type:@encode(MGLFillTranslateAnchor)]); } +- (void)testPropertyNames { + [self testPropertyName:@"is-fill-antialiased" isBoolean:YES]; + [self testPropertyName:@"fill-color" isBoolean:NO]; + [self testPropertyName:@"fill-opacity" isBoolean:NO]; + [self testPropertyName:@"fill-outline-color" isBoolean:NO]; + [self testPropertyName:@"fill-pattern" isBoolean:NO]; + [self testPropertyName:@"fill-translate" isBoolean:NO]; + [self testPropertyName:@"fill-translate-anchor" isBoolean:NO]; +} + @end |