summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLSymbolStyleLayerTests.mm
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-06-19 22:07:32 +0300
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-08-13 13:32:56 +0300
commit0ff218d688084146fee178ce52c17f346fa67198 (patch)
tree75378687211bc16b81ab68e9e2cc53ee3c5f8761 /platform/darwin/test/MGLSymbolStyleLayerTests.mm
parentf94460041353be26eb7516d7006a2c83a4aa19f2 (diff)
downloadqtlocation-mapboxgl-0ff218d688084146fee178ce52c17f346fa67198.tar.gz
[darwin] Add plural override for 'text-writing-mode' layout property
Diffstat (limited to 'platform/darwin/test/MGLSymbolStyleLayerTests.mm')
-rw-r--r--platform/darwin/test/MGLSymbolStyleLayerTests.mm36
1 files changed, 18 insertions, 18 deletions
diff --git a/platform/darwin/test/MGLSymbolStyleLayerTests.mm b/platform/darwin/test/MGLSymbolStyleLayerTests.mm
index 0f51fd000c..af7feed39c 100644
--- a/platform/darwin/test/MGLSymbolStyleLayerTests.mm
+++ b/platform/darwin/test/MGLSymbolStyleLayerTests.mm
@@ -2078,19 +2078,19 @@
{
XCTAssertTrue(rawLayer->getTextWritingMode().isUndefined(),
@"text-writing-mode should be unset initially.");
- NSExpression *defaultExpression = layer.textWritingMode;
+ NSExpression *defaultExpression = layer.textWritingModes;
NSExpression *constantExpression = [NSExpression expressionWithFormat:@"{'horizontal','vertical'}"];
- layer.textWritingMode = constantExpression;
+ layer.textWritingModes = constantExpression;
mbgl::style::PropertyValue<std::vector<mbgl::style::TextWritingModeType>> propertyValue = { { mbgl::style::TextWritingModeType::Horizontal, mbgl::style::TextWritingModeType::Vertical } };
XCTAssertEqual(rawLayer->getTextWritingMode(), propertyValue,
- @"Setting textWritingMode to a constant value expression should update text-writing-mode.");
- XCTAssertEqualObjects(layer.textWritingMode, constantExpression,
- @"textWritingMode should round-trip constant value expressions.");
+ @"Setting textWritingModes to a constant value expression should update text-writing-mode.");
+ XCTAssertEqualObjects(layer.textWritingModes, constantExpression,
+ @"textWritingModes should round-trip constant value expressions.");
constantExpression = [NSExpression expressionWithFormat:@"{'horizontal','vertical'}"];
NSExpression *functionExpression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:($zoomLevel, %@, %@)", constantExpression, @{@18: constantExpression}];
- layer.textWritingMode = functionExpression;
+ layer.textWritingModes = functionExpression;
{
using namespace mbgl::style::expression::dsl;
@@ -2100,22 +2100,22 @@
}
XCTAssertEqual(rawLayer->getTextWritingMode(), propertyValue,
- @"Setting textWritingMode to a camera expression should update text-writing-mode.");
- XCTAssertEqualObjects(layer.textWritingMode, functionExpression,
- @"textWritingMode should round-trip camera expressions.");
+ @"Setting textWritingModes to a camera expression should update text-writing-mode.");
+ XCTAssertEqualObjects(layer.textWritingModes, functionExpression,
+ @"textWritingModes should round-trip camera expressions.");
- layer.textWritingMode = nil;
+ layer.textWritingModes = nil;
XCTAssertTrue(rawLayer->getTextWritingMode().isUndefined(),
- @"Unsetting textWritingMode should return text-writing-mode to the default value.");
- XCTAssertEqualObjects(layer.textWritingMode, defaultExpression,
- @"textWritingMode should return the default value after being unset.");
+ @"Unsetting textWritingModes should return text-writing-mode to the default value.");
+ XCTAssertEqualObjects(layer.textWritingModes, defaultExpression,
+ @"textWritingModes should return the default value after being unset.");
functionExpression = [NSExpression expressionForKeyPath:@"bogus"];
- XCTAssertThrowsSpecificNamed(layer.textWritingMode = functionExpression, NSException, NSInvalidArgumentException, @"MGLSymbolLayer 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.textWritingModes = functionExpression, NSException, NSInvalidArgumentException, @"MGLSymbolLayer 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.textWritingMode = functionExpression, NSException, NSInvalidArgumentException, @"MGLSymbolLayer 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.textWritingModes = functionExpression, NSException, NSInvalidArgumentException, @"MGLSymbolLayer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes.");
}
// icon-color
@@ -3128,7 +3128,7 @@
[self testPropertyName:@"text-rotation-alignment" isBoolean:NO];
[self testPropertyName:@"text-transform" isBoolean:NO];
[self testPropertyName:@"text-variable-anchor" isBoolean:NO];
- [self testPropertyName:@"text-writing-mode" isBoolean:NO];
+ [self testPropertyName:@"text-writing-modes" isBoolean:NO];
[self testPropertyName:@"icon-color" isBoolean:NO];
[self testPropertyName:@"icon-halo-blur" isBoolean:NO];
[self testPropertyName:@"icon-halo-color" isBoolean:NO];
@@ -3193,8 +3193,8 @@
XCTAssertEqual([NSValue valueWithMGLTextTransform:MGLTextTransformNone].MGLTextTransformValue, MGLTextTransformNone);
XCTAssertEqual([NSValue valueWithMGLTextTransform:MGLTextTransformUppercase].MGLTextTransformValue, MGLTextTransformUppercase);
XCTAssertEqual([NSValue valueWithMGLTextTransform:MGLTextTransformLowercase].MGLTextTransformValue, MGLTextTransformLowercase);
- XCTAssertEqual([NSValue valueWithMGLTextWritingMode:MGLTextWritingModeHorizontal].MGLTextWritingModeValue, MGLTextWritingModeHorizontal);
- XCTAssertEqual([NSValue valueWithMGLTextWritingMode:MGLTextWritingModeVertical].MGLTextWritingModeValue, MGLTextWritingModeVertical);
+ XCTAssertEqual([NSValue valueWithMGLTextWritingModes:MGLTextWritingModesHorizontal].MGLTextWritingModesValue, MGLTextWritingModesHorizontal);
+ XCTAssertEqual([NSValue valueWithMGLTextWritingModes:MGLTextWritingModesVertical].MGLTextWritingModesValue, MGLTextWritingModesVertical);
XCTAssertEqual([NSValue valueWithMGLIconTranslationAnchor:MGLIconTranslationAnchorMap].MGLIconTranslationAnchorValue, MGLIconTranslationAnchorMap);
XCTAssertEqual([NSValue valueWithMGLIconTranslationAnchor:MGLIconTranslationAnchorViewport].MGLIconTranslationAnchorValue, MGLIconTranslationAnchorViewport);
XCTAssertEqual([NSValue valueWithMGLTextTranslationAnchor:MGLTextTranslationAnchorMap].MGLTextTranslationAnchorValue, MGLTextTranslationAnchorMap);