diff options
Diffstat (limited to 'platform/darwin/test/MGLRasterStyleLayerTests.m')
-rw-r--r-- | platform/darwin/test/MGLRasterStyleLayerTests.m | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/platform/darwin/test/MGLRasterStyleLayerTests.m b/platform/darwin/test/MGLRasterStyleLayerTests.m index 84fd0fe3e5..f8de191da0 100644 --- a/platform/darwin/test/MGLRasterStyleLayerTests.m +++ b/platform/darwin/test/MGLRasterStyleLayerTests.m @@ -8,10 +8,14 @@ @implementation MGLRasterLayerTests ++ (NSString *)layerType { + return @"raster"; +} + - (void)testRasterLayer { 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]; MGLRasterStyleLayer *layer = [[MGLRasterStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; [self.mapView.style addLayer:layer]; @@ -20,7 +24,7 @@ layer.minimumRasterBrightness = [MGLRuntimeStylingHelper testNumber]; layer.rasterContrast = [MGLRuntimeStylingHelper testNumber]; layer.rasterFadeDuration = [MGLRuntimeStylingHelper testNumber]; - layer.rasterHueRotate = [MGLRuntimeStylingHelper testNumber]; + layer.rasterHueRotation = [MGLRuntimeStylingHelper testNumber]; layer.rasterOpacity = [MGLRuntimeStylingHelper testNumber]; layer.rasterSaturation = [MGLRuntimeStylingHelper testNumber]; @@ -30,7 +34,7 @@ XCTAssertEqualObjects(gLayer.minimumRasterBrightness, [MGLRuntimeStylingHelper testNumber]); XCTAssertEqualObjects(gLayer.rasterContrast, [MGLRuntimeStylingHelper testNumber]); XCTAssertEqualObjects(gLayer.rasterFadeDuration, [MGLRuntimeStylingHelper testNumber]); - XCTAssertEqualObjects(gLayer.rasterHueRotate, [MGLRuntimeStylingHelper testNumber]); + XCTAssertEqualObjects(gLayer.rasterHueRotation, [MGLRuntimeStylingHelper testNumber]); XCTAssertEqualObjects(gLayer.rasterOpacity, [MGLRuntimeStylingHelper testNumber]); XCTAssertEqualObjects(gLayer.rasterSaturation, [MGLRuntimeStylingHelper testNumber]); @@ -38,7 +42,7 @@ layer.minimumRasterBrightness = [MGLRuntimeStylingHelper testNumberFunction]; layer.rasterContrast = [MGLRuntimeStylingHelper testNumberFunction]; layer.rasterFadeDuration = [MGLRuntimeStylingHelper testNumberFunction]; - layer.rasterHueRotate = [MGLRuntimeStylingHelper testNumberFunction]; + layer.rasterHueRotation = [MGLRuntimeStylingHelper testNumberFunction]; layer.rasterOpacity = [MGLRuntimeStylingHelper testNumberFunction]; layer.rasterSaturation = [MGLRuntimeStylingHelper testNumberFunction]; @@ -46,9 +50,19 @@ XCTAssertEqualObjects(gLayer.minimumRasterBrightness, [MGLRuntimeStylingHelper testNumberFunction]); XCTAssertEqualObjects(gLayer.rasterContrast, [MGLRuntimeStylingHelper testNumberFunction]); XCTAssertEqualObjects(gLayer.rasterFadeDuration, [MGLRuntimeStylingHelper testNumberFunction]); - XCTAssertEqualObjects(gLayer.rasterHueRotate, [MGLRuntimeStylingHelper testNumberFunction]); + XCTAssertEqualObjects(gLayer.rasterHueRotation, [MGLRuntimeStylingHelper testNumberFunction]); XCTAssertEqualObjects(gLayer.rasterOpacity, [MGLRuntimeStylingHelper testNumberFunction]); XCTAssertEqualObjects(gLayer.rasterSaturation, [MGLRuntimeStylingHelper testNumberFunction]); } +- (void)testPropertyNames { + [self testPropertyName:@"maximum-raster-brightness" isBoolean:NO]; + [self testPropertyName:@"minimum-raster-brightness" isBoolean:NO]; + [self testPropertyName:@"raster-contrast" isBoolean:NO]; + [self testPropertyName:@"raster-fade-duration" isBoolean:NO]; + [self testPropertyName:@"raster-hue-rotation" isBoolean:NO]; + [self testPropertyName:@"raster-opacity" isBoolean:NO]; + [self testPropertyName:@"raster-saturation" isBoolean:NO]; +} + @end |