diff options
Diffstat (limited to 'platform/darwin/test/MGLRasterStyleLayerTests.mm')
-rw-r--r-- | platform/darwin/test/MGLRasterStyleLayerTests.mm | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/platform/darwin/test/MGLRasterStyleLayerTests.mm b/platform/darwin/test/MGLRasterStyleLayerTests.mm index f71cc24d07..cc5c1b6984 100644 --- a/platform/darwin/test/MGLRasterStyleLayerTests.mm +++ b/platform/darwin/test/MGLRasterStyleLayerTests.mm @@ -310,19 +310,19 @@ { XCTAssertTrue(rawLayer->getRasterResampling().isUndefined(), @"raster-resampling should be unset initially."); - NSExpression *defaultExpression = layer.rasterResampling; + NSExpression *defaultExpression = layer.rasterResamplingMode; NSExpression *constantExpression = [NSExpression expressionWithFormat:@"'nearest'"]; - layer.rasterResampling = constantExpression; + layer.rasterResamplingMode = constantExpression; mbgl::style::PropertyValue<mbgl::style::RasterResamplingType> propertyValue = { mbgl::style::RasterResamplingType::Nearest }; XCTAssertEqual(rawLayer->getRasterResampling(), propertyValue, - @"Setting rasterResampling to a constant value expression should update raster-resampling."); - XCTAssertEqualObjects(layer.rasterResampling, constantExpression, - @"rasterResampling should round-trip constant value expressions."); + @"Setting rasterResamplingMode to a constant value expression should update raster-resampling."); + XCTAssertEqualObjects(layer.rasterResamplingMode, constantExpression, + @"rasterResamplingMode should round-trip constant value expressions."); constantExpression = [NSExpression expressionWithFormat:@"'nearest'"]; NSExpression *functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:($zoomLevel, %@, %@)", constantExpression, @{@18: constantExpression}]; - layer.rasterResampling = functionExpression; + layer.rasterResamplingMode = functionExpression; mbgl::style::IntervalStops<mbgl::style::RasterResamplingType> intervalStops = {{ { -INFINITY, mbgl::style::RasterResamplingType::Nearest }, @@ -331,22 +331,22 @@ propertyValue = mbgl::style::CameraFunction<mbgl::style::RasterResamplingType> { intervalStops }; XCTAssertEqual(rawLayer->getRasterResampling(), propertyValue, - @"Setting rasterResampling to a camera expression should update raster-resampling."); - XCTAssertEqualObjects(layer.rasterResampling, functionExpression, - @"rasterResampling should round-trip camera expressions."); + @"Setting rasterResamplingMode to a camera expression should update raster-resampling."); + XCTAssertEqualObjects(layer.rasterResamplingMode, functionExpression, + @"rasterResamplingMode should round-trip camera expressions."); - layer.rasterResampling = nil; + layer.rasterResamplingMode = nil; XCTAssertTrue(rawLayer->getRasterResampling().isUndefined(), - @"Unsetting rasterResampling should return raster-resampling to the default value."); - XCTAssertEqualObjects(layer.rasterResampling, defaultExpression, - @"rasterResampling should return the default value after being unset."); + @"Unsetting rasterResamplingMode should return raster-resampling to the default value."); + XCTAssertEqualObjects(layer.rasterResamplingMode, defaultExpression, + @"rasterResamplingMode should return the default value after being unset."); functionExpression = [NSExpression expressionForKeyPath:@"bogus"]; - XCTAssertThrowsSpecificNamed(layer.rasterResampling = functionExpression, NSException, NSInvalidArgumentException, @"MGLRasterLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes."); + XCTAssertThrowsSpecificNamed(layer.rasterResamplingMode = functionExpression, NSException, NSInvalidArgumentException, @"MGLRasterLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes."); functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:(bogus, %@, %@)", constantExpression, @{@18: constantExpression}]; functionExpression = [NSExpression expressionWithFormat:@"mgl_interpolate:withCurveType:parameters:stops:($zoomLevel, 'linear', nil, %@)", @{@10: functionExpression}]; - XCTAssertThrowsSpecificNamed(layer.rasterResampling = functionExpression, NSException, NSInvalidArgumentException, @"MGLRasterLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes."); + XCTAssertThrowsSpecificNamed(layer.rasterResamplingMode = functionExpression, NSException, NSInvalidArgumentException, @"MGLRasterLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes."); } // raster-saturation @@ -409,13 +409,13 @@ [self testPropertyName:@"raster-fade-duration" isBoolean:NO]; [self testPropertyName:@"raster-hue-rotation" isBoolean:NO]; [self testPropertyName:@"raster-opacity" isBoolean:NO]; - [self testPropertyName:@"raster-resampling" isBoolean:NO]; + [self testPropertyName:@"raster-resampling-mode" isBoolean:NO]; [self testPropertyName:@"raster-saturation" isBoolean:NO]; } - (void)testValueAdditions { - XCTAssertEqual([NSValue valueWithMGLRasterResampling:MGLRasterResamplingLinear].MGLRasterResamplingValue, MGLRasterResamplingLinear); - XCTAssertEqual([NSValue valueWithMGLRasterResampling:MGLRasterResamplingNearest].MGLRasterResamplingValue, MGLRasterResamplingNearest); + XCTAssertEqual([NSValue valueWithMGLRasterResamplingMode:MGLRasterResamplingModeLinear].MGLRasterResamplingModeValue, MGLRasterResamplingModeLinear); + XCTAssertEqual([NSValue valueWithMGLRasterResamplingMode:MGLRasterResamplingModeNearest].MGLRasterResamplingModeValue, MGLRasterResamplingModeNearest); } @end |