diff options
Diffstat (limited to 'platform/darwin/test/MGLLineStyleLayerTests.m')
-rw-r--r-- | platform/darwin/test/MGLLineStyleLayerTests.m | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/platform/darwin/test/MGLLineStyleLayerTests.m b/platform/darwin/test/MGLLineStyleLayerTests.m index 95983b1f52..e877c1d57a 100644 --- a/platform/darwin/test/MGLLineStyleLayerTests.m +++ b/platform/darwin/test/MGLLineStyleLayerTests.m @@ -8,10 +8,14 @@ @implementation MGLLineLayerTests ++ (NSString *)layerType { + return @"line"; +} + - (void)testLineLayer { 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]; MGLLineStyleLayer *layer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; [self.mapView.style addLayer:layer]; @@ -22,7 +26,7 @@ layer.lineRoundLimit = [MGLRuntimeStylingHelper testNumber]; layer.lineBlur = [MGLRuntimeStylingHelper testNumber]; layer.lineColor = [MGLRuntimeStylingHelper testColor]; - layer.lineDasharray = [MGLRuntimeStylingHelper testDashArray]; + layer.lineDashPattern = [MGLRuntimeStylingHelper testDashArray]; layer.lineGapWidth = [MGLRuntimeStylingHelper testNumber]; layer.lineOffset = [MGLRuntimeStylingHelper testNumber]; layer.lineOpacity = [MGLRuntimeStylingHelper testNumber]; @@ -41,7 +45,7 @@ XCTAssertEqualObjects(gLayer.lineRoundLimit, [MGLRuntimeStylingHelper testNumber]); XCTAssertEqualObjects(gLayer.lineBlur, [MGLRuntimeStylingHelper testNumber]); XCTAssertEqualObjects(gLayer.lineColor, [MGLRuntimeStylingHelper testColor]); - XCTAssertEqualObjects(gLayer.lineDasharray, [MGLRuntimeStylingHelper testDashArray]); + XCTAssertEqualObjects(gLayer.lineDashPattern, [MGLRuntimeStylingHelper testDashArray]); XCTAssertEqualObjects(gLayer.lineGapWidth, [MGLRuntimeStylingHelper testNumber]); XCTAssertEqualObjects(gLayer.lineOffset, [MGLRuntimeStylingHelper testNumber]); XCTAssertEqualObjects(gLayer.lineOpacity, [MGLRuntimeStylingHelper testNumber]); @@ -57,7 +61,7 @@ layer.lineRoundLimit = [MGLRuntimeStylingHelper testNumberFunction]; layer.lineBlur = [MGLRuntimeStylingHelper testNumberFunction]; layer.lineColor = [MGLRuntimeStylingHelper testColorFunction]; - layer.lineDasharray = [MGLRuntimeStylingHelper testDashArrayFunction]; + layer.lineDashPattern = [MGLRuntimeStylingHelper testDashArrayFunction]; layer.lineGapWidth = [MGLRuntimeStylingHelper testNumberFunction]; layer.lineOffset = [MGLRuntimeStylingHelper testNumberFunction]; layer.lineOpacity = [MGLRuntimeStylingHelper testNumberFunction]; @@ -72,7 +76,7 @@ XCTAssertEqualObjects(gLayer.lineRoundLimit, [MGLRuntimeStylingHelper testNumberFunction]); XCTAssertEqualObjects(gLayer.lineBlur, [MGLRuntimeStylingHelper testNumberFunction]); XCTAssertEqualObjects(gLayer.lineColor, [MGLRuntimeStylingHelper testColorFunction]); - XCTAssertEqualObjects(gLayer.lineDasharray, [MGLRuntimeStylingHelper testDashArrayFunction]); + XCTAssertEqualObjects(gLayer.lineDashPattern, [MGLRuntimeStylingHelper testDashArrayFunction]); XCTAssertEqualObjects(gLayer.lineGapWidth, [MGLRuntimeStylingHelper testNumberFunction]); XCTAssertEqualObjects(gLayer.lineOffset, [MGLRuntimeStylingHelper testNumberFunction]); XCTAssertEqualObjects(gLayer.lineOpacity, [MGLRuntimeStylingHelper testNumberFunction]); @@ -82,4 +86,21 @@ XCTAssertEqualObjects(gLayer.lineWidth, [MGLRuntimeStylingHelper testNumberFunction]); } +- (void)testPropertyNames { + [self testPropertyName:@"line-cap" isBoolean:NO]; + [self testPropertyName:@"line-join" isBoolean:NO]; + [self testPropertyName:@"line-miter-limit" isBoolean:NO]; + [self testPropertyName:@"line-round-limit" isBoolean:NO]; + [self testPropertyName:@"line-blur" isBoolean:NO]; + [self testPropertyName:@"line-color" isBoolean:NO]; + [self testPropertyName:@"line-dash-pattern" isBoolean:NO]; + [self testPropertyName:@"line-gap-width" isBoolean:NO]; + [self testPropertyName:@"line-offset" isBoolean:NO]; + [self testPropertyName:@"line-opacity" isBoolean:NO]; + [self testPropertyName:@"line-pattern" isBoolean:NO]; + [self testPropertyName:@"line-translate" isBoolean:NO]; + [self testPropertyName:@"line-translate-anchor" isBoolean:NO]; + [self testPropertyName:@"line-width" isBoolean:NO]; +} + @end |