summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLSymbolStyleLayerTests.mm
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-01-26 18:52:44 +0100
committerKonstantin Käfer <mail@kkaefer.com>2017-01-27 11:44:16 +0100
commit62ea1f21858c69f6921c775ba7a3de201f0514d8 (patch)
tree7a4da88706e8a5513e1e13e993b2acc212cae3b1 /platform/darwin/test/MGLSymbolStyleLayerTests.mm
parenta662508ddde4043ece36d8ea9b424368891d892c (diff)
downloadqtlocation-mapboxgl-62ea1f21858c69f6921c775ba7a3de201f0514d8.tar.gz
[core] remove trailing whitespace, add trailing newlines, add space after //
Diffstat (limited to 'platform/darwin/test/MGLSymbolStyleLayerTests.mm')
-rw-r--r--platform/darwin/test/MGLSymbolStyleLayerTests.mm392
1 files changed, 196 insertions, 196 deletions
diff --git a/platform/darwin/test/MGLSymbolStyleLayerTests.mm b/platform/darwin/test/MGLSymbolStyleLayerTests.mm
index 80a9c9d3ec..202cbe4e9d 100644
--- a/platform/darwin/test/MGLSymbolStyleLayerTests.mm
+++ b/platform/darwin/test/MGLSymbolStyleLayerTests.mm
@@ -1,4 +1,4 @@
-// This file is generated.
+// This file is generated.
// Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`.
#import "MGLStyleLayerTests.h"
@@ -20,13 +20,13 @@
MGLPointFeature *feature = [[MGLPointFeature alloc] init];
MGLShapeSource *source = [[MGLShapeSource alloc] initWithIdentifier:@"sourceID" shape:feature options:nil];
MGLSymbolStyleLayer *layer = [[MGLSymbolStyleLayer alloc] initWithIdentifier:@"layerID" source:source];
-
+
XCTAssertNil(layer.sourceLayerIdentifier);
layer.sourceLayerIdentifier = @"layerID";
XCTAssertEqualObjects(layer.sourceLayerIdentifier, @"layerID");
layer.sourceLayerIdentifier = nil;
XCTAssertNil(layer.sourceLayerIdentifier);
-
+
XCTAssertNil(layer.predicate);
layer.predicate = [NSPredicate predicateWithValue:NO];
XCTAssertEqualObjects(layer.predicate, [NSPredicate predicateWithValue:NO]);
@@ -37,18 +37,18 @@
- (void)testProperties {
MGLPointFeature *feature = [[MGLPointFeature alloc] init];
MGLShapeSource *source = [[MGLShapeSource alloc] initWithIdentifier:@"sourceID" shape:feature options:nil];
-
+
MGLSymbolStyleLayer *layer = [[MGLSymbolStyleLayer alloc] initWithIdentifier:@"layerID" source:source];
XCTAssertNotEqual(layer.rawLayer, nullptr);
XCTAssertTrue(layer.rawLayer->is<mbgl::style::SymbolLayer>());
auto rawLayer = layer.rawLayer->as<mbgl::style::SymbolLayer>();
-
+
// icon-allow-overlap
{
XCTAssertTrue(rawLayer->getIconAllowOverlap().isUndefined(),
@"icon-allow-overlap should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.iconAllowsOverlap;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@YES];
layer.iconAllowsOverlap = styleValue;
mbgl::style::PropertyValue<bool> propertyValue = { true };
@@ -56,7 +56,7 @@
@"Setting iconAllowsOverlap to a constant value should update icon-allow-overlap.");
XCTAssertEqualObjects(layer.iconAllowsOverlap, styleValue,
@"iconAllowsOverlap should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -69,20 +69,20 @@
@"Setting iconAllowsOverlap to a function should update icon-allow-overlap.");
XCTAssertEqualObjects(layer.iconAllowsOverlap, styleValue,
@"iconAllowsOverlap should round-trip functions.");
-
+
layer.iconAllowsOverlap = nil;
XCTAssertTrue(rawLayer->getIconAllowOverlap().isUndefined(),
@"Unsetting iconAllowsOverlap should return icon-allow-overlap to the default value.");
XCTAssertEqualObjects(layer.iconAllowsOverlap, defaultStyleValue,
@"iconAllowsOverlap should return the default value after being unset.");
}
-
+
// icon-ignore-placement
{
XCTAssertTrue(rawLayer->getIconIgnorePlacement().isUndefined(),
@"icon-ignore-placement should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.iconIgnoresPlacement;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@YES];
layer.iconIgnoresPlacement = styleValue;
mbgl::style::PropertyValue<bool> propertyValue = { true };
@@ -90,7 +90,7 @@
@"Setting iconIgnoresPlacement to a constant value should update icon-ignore-placement.");
XCTAssertEqualObjects(layer.iconIgnoresPlacement, styleValue,
@"iconIgnoresPlacement should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -103,20 +103,20 @@
@"Setting iconIgnoresPlacement to a function should update icon-ignore-placement.");
XCTAssertEqualObjects(layer.iconIgnoresPlacement, styleValue,
@"iconIgnoresPlacement should round-trip functions.");
-
+
layer.iconIgnoresPlacement = nil;
XCTAssertTrue(rawLayer->getIconIgnorePlacement().isUndefined(),
@"Unsetting iconIgnoresPlacement should return icon-ignore-placement to the default value.");
XCTAssertEqualObjects(layer.iconIgnoresPlacement, defaultStyleValue,
@"iconIgnoresPlacement should return the default value after being unset.");
}
-
+
// icon-image
{
XCTAssertTrue(rawLayer->getIconImage().isUndefined(),
@"icon-image should be unset initially.");
MGLStyleValue<NSString *> *defaultStyleValue = layer.iconImageName;
-
+
MGLStyleValue<NSString *> *styleValue = [MGLStyleValue<NSString *> valueWithRawValue:@"Icon Image"];
layer.iconImageName = styleValue;
mbgl::style::PropertyValue<std::string> propertyValue = { "Icon Image" };
@@ -124,7 +124,7 @@
@"Setting iconImageName to a constant value should update icon-image.");
XCTAssertEqualObjects(layer.iconImageName, styleValue,
@"iconImageName should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSString *> valueWithStops:@{
@18: styleValue,
}];
@@ -137,20 +137,20 @@
@"Setting iconImageName to a function should update icon-image.");
XCTAssertEqualObjects(layer.iconImageName, styleValue,
@"iconImageName should round-trip functions.");
-
+
layer.iconImageName = nil;
XCTAssertTrue(rawLayer->getIconImage().isUndefined(),
@"Unsetting iconImageName should return icon-image to the default value.");
XCTAssertEqualObjects(layer.iconImageName, defaultStyleValue,
@"iconImageName should return the default value after being unset.");
}
-
+
// icon-offset
{
XCTAssertTrue(rawLayer->getIconOffset().isUndefined(),
@"icon-offset should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.iconOffset;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:
#if TARGET_OS_IPHONE
[NSValue valueWithCGVector:CGVectorMake(1, 1)]
@@ -164,7 +164,7 @@
@"Setting iconOffset to a constant value should update icon-offset.");
XCTAssertEqualObjects(layer.iconOffset, styleValue,
@"iconOffset should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -177,20 +177,20 @@
@"Setting iconOffset to a function should update icon-offset.");
XCTAssertEqualObjects(layer.iconOffset, styleValue,
@"iconOffset should round-trip functions.");
-
+
layer.iconOffset = nil;
XCTAssertTrue(rawLayer->getIconOffset().isUndefined(),
@"Unsetting iconOffset should return icon-offset to the default value.");
XCTAssertEqualObjects(layer.iconOffset, defaultStyleValue,
@"iconOffset should return the default value after being unset.");
}
-
+
// icon-optional
{
XCTAssertTrue(rawLayer->getIconOptional().isUndefined(),
@"icon-optional should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.iconOptional;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@YES];
layer.iconOptional = styleValue;
mbgl::style::PropertyValue<bool> propertyValue = { true };
@@ -198,7 +198,7 @@
@"Setting iconOptional to a constant value should update icon-optional.");
XCTAssertEqualObjects(layer.iconOptional, styleValue,
@"iconOptional should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -211,20 +211,20 @@
@"Setting iconOptional to a function should update icon-optional.");
XCTAssertEqualObjects(layer.iconOptional, styleValue,
@"iconOptional should round-trip functions.");
-
+
layer.iconOptional = nil;
XCTAssertTrue(rawLayer->getIconOptional().isUndefined(),
@"Unsetting iconOptional should return icon-optional to the default value.");
XCTAssertEqualObjects(layer.iconOptional, defaultStyleValue,
@"iconOptional should return the default value after being unset.");
}
-
+
// icon-padding
{
XCTAssertTrue(rawLayer->getIconPadding().isUndefined(),
@"icon-padding should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.iconPadding;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.iconPadding = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -232,7 +232,7 @@
@"Setting iconPadding to a constant value should update icon-padding.");
XCTAssertEqualObjects(layer.iconPadding, styleValue,
@"iconPadding should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -245,20 +245,20 @@
@"Setting iconPadding to a function should update icon-padding.");
XCTAssertEqualObjects(layer.iconPadding, styleValue,
@"iconPadding should round-trip functions.");
-
+
layer.iconPadding = nil;
XCTAssertTrue(rawLayer->getIconPadding().isUndefined(),
@"Unsetting iconPadding should return icon-padding to the default value.");
XCTAssertEqualObjects(layer.iconPadding, defaultStyleValue,
@"iconPadding should return the default value after being unset.");
}
-
+
// icon-rotate
{
XCTAssertTrue(rawLayer->getIconRotate().isUndefined(),
@"icon-rotate should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.iconRotation;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.iconRotation = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -266,7 +266,7 @@
@"Setting iconRotation to a constant value should update icon-rotate.");
XCTAssertEqualObjects(layer.iconRotation, styleValue,
@"iconRotation should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -279,20 +279,20 @@
@"Setting iconRotation to a function should update icon-rotate.");
XCTAssertEqualObjects(layer.iconRotation, styleValue,
@"iconRotation should round-trip functions.");
-
+
layer.iconRotation = nil;
XCTAssertTrue(rawLayer->getIconRotate().isUndefined(),
@"Unsetting iconRotation should return icon-rotate to the default value.");
XCTAssertEqualObjects(layer.iconRotation, defaultStyleValue,
@"iconRotation should return the default value after being unset.");
}
-
+
// icon-rotation-alignment
{
XCTAssertTrue(rawLayer->getIconRotationAlignment().isUndefined(),
@"icon-rotation-alignment should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.iconRotationAlignment;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLIconRotationAlignment:MGLIconRotationAlignmentAuto]];
layer.iconRotationAlignment = styleValue;
mbgl::style::PropertyValue<mbgl::style::AlignmentType> propertyValue = { mbgl::style::AlignmentType::Auto };
@@ -300,7 +300,7 @@
@"Setting iconRotationAlignment to a constant value should update icon-rotation-alignment.");
XCTAssertEqualObjects(layer.iconRotationAlignment, styleValue,
@"iconRotationAlignment should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -313,20 +313,20 @@
@"Setting iconRotationAlignment to a function should update icon-rotation-alignment.");
XCTAssertEqualObjects(layer.iconRotationAlignment, styleValue,
@"iconRotationAlignment should round-trip functions.");
-
+
layer.iconRotationAlignment = nil;
XCTAssertTrue(rawLayer->getIconRotationAlignment().isUndefined(),
@"Unsetting iconRotationAlignment should return icon-rotation-alignment to the default value.");
XCTAssertEqualObjects(layer.iconRotationAlignment, defaultStyleValue,
@"iconRotationAlignment should return the default value after being unset.");
}
-
+
// icon-size
{
XCTAssertTrue(rawLayer->getIconSize().isUndefined(),
@"icon-size should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.iconScale;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.iconScale = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -334,7 +334,7 @@
@"Setting iconScale to a constant value should update icon-size.");
XCTAssertEqualObjects(layer.iconScale, styleValue,
@"iconScale should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -347,20 +347,20 @@
@"Setting iconScale to a function should update icon-size.");
XCTAssertEqualObjects(layer.iconScale, styleValue,
@"iconScale should round-trip functions.");
-
+
layer.iconScale = nil;
XCTAssertTrue(rawLayer->getIconSize().isUndefined(),
@"Unsetting iconScale should return icon-size to the default value.");
XCTAssertEqualObjects(layer.iconScale, defaultStyleValue,
@"iconScale should return the default value after being unset.");
}
-
+
// icon-text-fit
{
XCTAssertTrue(rawLayer->getIconTextFit().isUndefined(),
@"icon-text-fit should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.iconTextFit;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLIconTextFit:MGLIconTextFitBoth]];
layer.iconTextFit = styleValue;
mbgl::style::PropertyValue<mbgl::style::IconTextFitType> propertyValue = { mbgl::style::IconTextFitType::Both };
@@ -368,7 +368,7 @@
@"Setting iconTextFit to a constant value should update icon-text-fit.");
XCTAssertEqualObjects(layer.iconTextFit, styleValue,
@"iconTextFit should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -381,20 +381,20 @@
@"Setting iconTextFit to a function should update icon-text-fit.");
XCTAssertEqualObjects(layer.iconTextFit, styleValue,
@"iconTextFit should round-trip functions.");
-
+
layer.iconTextFit = nil;
XCTAssertTrue(rawLayer->getIconTextFit().isUndefined(),
@"Unsetting iconTextFit should return icon-text-fit to the default value.");
XCTAssertEqualObjects(layer.iconTextFit, defaultStyleValue,
@"iconTextFit should return the default value after being unset.");
}
-
+
// icon-text-fit-padding
{
XCTAssertTrue(rawLayer->getIconTextFitPadding().isUndefined(),
@"icon-text-fit-padding should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.iconTextFitPadding;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:
#if TARGET_OS_IPHONE
[NSValue valueWithUIEdgeInsets:UIEdgeInsetsMake(1, 1, 1, 1)]
@@ -408,7 +408,7 @@
@"Setting iconTextFitPadding to a constant value should update icon-text-fit-padding.");
XCTAssertEqualObjects(layer.iconTextFitPadding, styleValue,
@"iconTextFitPadding should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -421,20 +421,20 @@
@"Setting iconTextFitPadding to a function should update icon-text-fit-padding.");
XCTAssertEqualObjects(layer.iconTextFitPadding, styleValue,
@"iconTextFitPadding should round-trip functions.");
-
+
layer.iconTextFitPadding = nil;
XCTAssertTrue(rawLayer->getIconTextFitPadding().isUndefined(),
@"Unsetting iconTextFitPadding should return icon-text-fit-padding to the default value.");
XCTAssertEqualObjects(layer.iconTextFitPadding, defaultStyleValue,
@"iconTextFitPadding should return the default value after being unset.");
}
-
+
// icon-keep-upright
{
XCTAssertTrue(rawLayer->getIconKeepUpright().isUndefined(),
@"icon-keep-upright should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.keepsIconUpright;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@YES];
layer.keepsIconUpright = styleValue;
mbgl::style::PropertyValue<bool> propertyValue = { true };
@@ -442,7 +442,7 @@
@"Setting keepsIconUpright to a constant value should update icon-keep-upright.");
XCTAssertEqualObjects(layer.keepsIconUpright, styleValue,
@"keepsIconUpright should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -455,20 +455,20 @@
@"Setting keepsIconUpright to a function should update icon-keep-upright.");
XCTAssertEqualObjects(layer.keepsIconUpright, styleValue,
@"keepsIconUpright should round-trip functions.");
-
+
layer.keepsIconUpright = nil;
XCTAssertTrue(rawLayer->getIconKeepUpright().isUndefined(),
@"Unsetting keepsIconUpright should return icon-keep-upright to the default value.");
XCTAssertEqualObjects(layer.keepsIconUpright, defaultStyleValue,
@"keepsIconUpright should return the default value after being unset.");
}
-
+
// text-keep-upright
{
XCTAssertTrue(rawLayer->getTextKeepUpright().isUndefined(),
@"text-keep-upright should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.keepsTextUpright;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@NO];
layer.keepsTextUpright = styleValue;
mbgl::style::PropertyValue<bool> propertyValue = { false };
@@ -476,7 +476,7 @@
@"Setting keepsTextUpright to a constant value should update text-keep-upright.");
XCTAssertEqualObjects(layer.keepsTextUpright, styleValue,
@"keepsTextUpright should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -489,20 +489,20 @@
@"Setting keepsTextUpright to a function should update text-keep-upright.");
XCTAssertEqualObjects(layer.keepsTextUpright, styleValue,
@"keepsTextUpright should round-trip functions.");
-
+
layer.keepsTextUpright = nil;
XCTAssertTrue(rawLayer->getTextKeepUpright().isUndefined(),
@"Unsetting keepsTextUpright should return text-keep-upright to the default value.");
XCTAssertEqualObjects(layer.keepsTextUpright, defaultStyleValue,
@"keepsTextUpright should return the default value after being unset.");
}
-
+
// text-max-angle
{
XCTAssertTrue(rawLayer->getTextMaxAngle().isUndefined(),
@"text-max-angle should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.maximumTextAngle;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.maximumTextAngle = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -510,7 +510,7 @@
@"Setting maximumTextAngle to a constant value should update text-max-angle.");
XCTAssertEqualObjects(layer.maximumTextAngle, styleValue,
@"maximumTextAngle should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -523,20 +523,20 @@
@"Setting maximumTextAngle to a function should update text-max-angle.");
XCTAssertEqualObjects(layer.maximumTextAngle, styleValue,
@"maximumTextAngle should round-trip functions.");
-
+
layer.maximumTextAngle = nil;
XCTAssertTrue(rawLayer->getTextMaxAngle().isUndefined(),
@"Unsetting maximumTextAngle should return text-max-angle to the default value.");
XCTAssertEqualObjects(layer.maximumTextAngle, defaultStyleValue,
@"maximumTextAngle should return the default value after being unset.");
}
-
+
// text-max-width
{
XCTAssertTrue(rawLayer->getTextMaxWidth().isUndefined(),
@"text-max-width should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.maximumTextWidth;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.maximumTextWidth = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -544,7 +544,7 @@
@"Setting maximumTextWidth to a constant value should update text-max-width.");
XCTAssertEqualObjects(layer.maximumTextWidth, styleValue,
@"maximumTextWidth should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -557,20 +557,20 @@
@"Setting maximumTextWidth to a function should update text-max-width.");
XCTAssertEqualObjects(layer.maximumTextWidth, styleValue,
@"maximumTextWidth should round-trip functions.");
-
+
layer.maximumTextWidth = nil;
XCTAssertTrue(rawLayer->getTextMaxWidth().isUndefined(),
@"Unsetting maximumTextWidth should return text-max-width to the default value.");
XCTAssertEqualObjects(layer.maximumTextWidth, defaultStyleValue,
@"maximumTextWidth should return the default value after being unset.");
}
-
+
// symbol-avoid-edges
{
XCTAssertTrue(rawLayer->getSymbolAvoidEdges().isUndefined(),
@"symbol-avoid-edges should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.symbolAvoidsEdges;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@YES];
layer.symbolAvoidsEdges = styleValue;
mbgl::style::PropertyValue<bool> propertyValue = { true };
@@ -578,7 +578,7 @@
@"Setting symbolAvoidsEdges to a constant value should update symbol-avoid-edges.");
XCTAssertEqualObjects(layer.symbolAvoidsEdges, styleValue,
@"symbolAvoidsEdges should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -591,20 +591,20 @@
@"Setting symbolAvoidsEdges to a function should update symbol-avoid-edges.");
XCTAssertEqualObjects(layer.symbolAvoidsEdges, styleValue,
@"symbolAvoidsEdges should round-trip functions.");
-
+
layer.symbolAvoidsEdges = nil;
XCTAssertTrue(rawLayer->getSymbolAvoidEdges().isUndefined(),
@"Unsetting symbolAvoidsEdges should return symbol-avoid-edges to the default value.");
XCTAssertEqualObjects(layer.symbolAvoidsEdges, defaultStyleValue,
@"symbolAvoidsEdges should return the default value after being unset.");
}
-
+
// symbol-placement
{
XCTAssertTrue(rawLayer->getSymbolPlacement().isUndefined(),
@"symbol-placement should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.symbolPlacement;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLSymbolPlacement:MGLSymbolPlacementLine]];
layer.symbolPlacement = styleValue;
mbgl::style::PropertyValue<mbgl::style::SymbolPlacementType> propertyValue = { mbgl::style::SymbolPlacementType::Line };
@@ -612,7 +612,7 @@
@"Setting symbolPlacement to a constant value should update symbol-placement.");
XCTAssertEqualObjects(layer.symbolPlacement, styleValue,
@"symbolPlacement should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -625,20 +625,20 @@
@"Setting symbolPlacement to a function should update symbol-placement.");
XCTAssertEqualObjects(layer.symbolPlacement, styleValue,
@"symbolPlacement should round-trip functions.");
-
+
layer.symbolPlacement = nil;
XCTAssertTrue(rawLayer->getSymbolPlacement().isUndefined(),
@"Unsetting symbolPlacement should return symbol-placement to the default value.");
XCTAssertEqualObjects(layer.symbolPlacement, defaultStyleValue,
@"symbolPlacement should return the default value after being unset.");
}
-
+
// symbol-spacing
{
XCTAssertTrue(rawLayer->getSymbolSpacing().isUndefined(),
@"symbol-spacing should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.symbolSpacing;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.symbolSpacing = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -646,7 +646,7 @@
@"Setting symbolSpacing to a constant value should update symbol-spacing.");
XCTAssertEqualObjects(layer.symbolSpacing, styleValue,
@"symbolSpacing should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -659,20 +659,20 @@
@"Setting symbolSpacing to a function should update symbol-spacing.");
XCTAssertEqualObjects(layer.symbolSpacing, styleValue,
@"symbolSpacing should round-trip functions.");
-
+
layer.symbolSpacing = nil;
XCTAssertTrue(rawLayer->getSymbolSpacing().isUndefined(),
@"Unsetting symbolSpacing should return symbol-spacing to the default value.");
XCTAssertEqualObjects(layer.symbolSpacing, defaultStyleValue,
@"symbolSpacing should return the default value after being unset.");
}
-
+
// text-field
{
XCTAssertTrue(rawLayer->getTextField().isUndefined(),
@"text-field should be unset initially.");
MGLStyleValue<NSString *> *defaultStyleValue = layer.text;
-
+
MGLStyleValue<NSString *> *styleValue = [MGLStyleValue<NSString *> valueWithRawValue:@"Text Field"];
layer.text = styleValue;
mbgl::style::PropertyValue<std::string> propertyValue = { "Text Field" };
@@ -680,7 +680,7 @@
@"Setting text to a constant value should update text-field.");
XCTAssertEqualObjects(layer.text, styleValue,
@"text should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSString *> valueWithStops:@{
@18: styleValue,
}];
@@ -693,20 +693,20 @@
@"Setting text to a function should update text-field.");
XCTAssertEqualObjects(layer.text, styleValue,
@"text should round-trip functions.");
-
+
layer.text = nil;
XCTAssertTrue(rawLayer->getTextField().isUndefined(),
@"Unsetting text should return text-field to the default value.");
XCTAssertEqualObjects(layer.text, defaultStyleValue,
@"text should return the default value after being unset.");
}
-
+
// text-allow-overlap
{
XCTAssertTrue(rawLayer->getTextAllowOverlap().isUndefined(),
@"text-allow-overlap should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.textAllowsOverlap;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@YES];
layer.textAllowsOverlap = styleValue;
mbgl::style::PropertyValue<bool> propertyValue = { true };
@@ -714,7 +714,7 @@
@"Setting textAllowsOverlap to a constant value should update text-allow-overlap.");
XCTAssertEqualObjects(layer.textAllowsOverlap, styleValue,
@"textAllowsOverlap should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -727,20 +727,20 @@
@"Setting textAllowsOverlap to a function should update text-allow-overlap.");
XCTAssertEqualObjects(layer.textAllowsOverlap, styleValue,
@"textAllowsOverlap should round-trip functions.");
-
+
layer.textAllowsOverlap = nil;
XCTAssertTrue(rawLayer->getTextAllowOverlap().isUndefined(),
@"Unsetting textAllowsOverlap should return text-allow-overlap to the default value.");
XCTAssertEqualObjects(layer.textAllowsOverlap, defaultStyleValue,
@"textAllowsOverlap should return the default value after being unset.");
}
-
+
// text-anchor
{
XCTAssertTrue(rawLayer->getTextAnchor().isUndefined(),
@"text-anchor should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.textAnchor;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLTextAnchor:MGLTextAnchorBottomRight]];
layer.textAnchor = styleValue;
mbgl::style::PropertyValue<mbgl::style::TextAnchorType> propertyValue = { mbgl::style::TextAnchorType::BottomRight };
@@ -748,7 +748,7 @@
@"Setting textAnchor to a constant value should update text-anchor.");
XCTAssertEqualObjects(layer.textAnchor, styleValue,
@"textAnchor should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -761,20 +761,20 @@
@"Setting textAnchor to a function should update text-anchor.");
XCTAssertEqualObjects(layer.textAnchor, styleValue,
@"textAnchor should round-trip functions.");
-
+
layer.textAnchor = nil;
XCTAssertTrue(rawLayer->getTextAnchor().isUndefined(),
@"Unsetting textAnchor should return text-anchor to the default value.");
XCTAssertEqualObjects(layer.textAnchor, defaultStyleValue,
@"textAnchor should return the default value after being unset.");
}
-
+
// text-font
{
XCTAssertTrue(rawLayer->getTextFont().isUndefined(),
@"text-font should be unset initially.");
MGLStyleValue<NSArray<NSString *> *> *defaultStyleValue = layer.textFontNames;
-
+
MGLStyleValue<NSArray<NSString *> *> *styleValue = [MGLStyleValue<NSArray<NSString *> *> valueWithRawValue:@[@"Text Font", @"Tnof Txet"]];
layer.textFontNames = styleValue;
mbgl::style::PropertyValue<std::vector<std::string>> propertyValue = { { "Text Font", "Tnof Txet" } };
@@ -782,7 +782,7 @@
@"Setting textFontNames to a constant value should update text-font.");
XCTAssertEqualObjects(layer.textFontNames, styleValue,
@"textFontNames should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSArray<NSString *> *> valueWithStops:@{
@18: styleValue,
}];
@@ -795,20 +795,20 @@
@"Setting textFontNames to a function should update text-font.");
XCTAssertEqualObjects(layer.textFontNames, styleValue,
@"textFontNames should round-trip functions.");
-
+
layer.textFontNames = nil;
XCTAssertTrue(rawLayer->getTextFont().isUndefined(),
@"Unsetting textFontNames should return text-font to the default value.");
XCTAssertEqualObjects(layer.textFontNames, defaultStyleValue,
@"textFontNames should return the default value after being unset.");
}
-
+
// text-size
{
XCTAssertTrue(rawLayer->getTextSize().isUndefined(),
@"text-size should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.textFontSize;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.textFontSize = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -816,7 +816,7 @@
@"Setting textFontSize to a constant value should update text-size.");
XCTAssertEqualObjects(layer.textFontSize, styleValue,
@"textFontSize should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -829,20 +829,20 @@
@"Setting textFontSize to a function should update text-size.");
XCTAssertEqualObjects(layer.textFontSize, styleValue,
@"textFontSize should round-trip functions.");
-
+
layer.textFontSize = nil;
XCTAssertTrue(rawLayer->getTextSize().isUndefined(),
@"Unsetting textFontSize should return text-size to the default value.");
XCTAssertEqualObjects(layer.textFontSize, defaultStyleValue,
@"textFontSize should return the default value after being unset.");
}
-
+
// text-ignore-placement
{
XCTAssertTrue(rawLayer->getTextIgnorePlacement().isUndefined(),
@"text-ignore-placement should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.textIgnoresPlacement;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@YES];
layer.textIgnoresPlacement = styleValue;
mbgl::style::PropertyValue<bool> propertyValue = { true };
@@ -850,7 +850,7 @@
@"Setting textIgnoresPlacement to a constant value should update text-ignore-placement.");
XCTAssertEqualObjects(layer.textIgnoresPlacement, styleValue,
@"textIgnoresPlacement should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -863,20 +863,20 @@
@"Setting textIgnoresPlacement to a function should update text-ignore-placement.");
XCTAssertEqualObjects(layer.textIgnoresPlacement, styleValue,
@"textIgnoresPlacement should round-trip functions.");
-
+
layer.textIgnoresPlacement = nil;
XCTAssertTrue(rawLayer->getTextIgnorePlacement().isUndefined(),
@"Unsetting textIgnoresPlacement should return text-ignore-placement to the default value.");
XCTAssertEqualObjects(layer.textIgnoresPlacement, defaultStyleValue,
@"textIgnoresPlacement should return the default value after being unset.");
}
-
+
// text-justify
{
XCTAssertTrue(rawLayer->getTextJustify().isUndefined(),
@"text-justify should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.textJustification;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLTextJustification:MGLTextJustificationRight]];
layer.textJustification = styleValue;
mbgl::style::PropertyValue<mbgl::style::TextJustifyType> propertyValue = { mbgl::style::TextJustifyType::Right };
@@ -884,7 +884,7 @@
@"Setting textJustification to a constant value should update text-justify.");
XCTAssertEqualObjects(layer.textJustification, styleValue,
@"textJustification should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -897,20 +897,20 @@
@"Setting textJustification to a function should update text-justify.");
XCTAssertEqualObjects(layer.textJustification, styleValue,
@"textJustification should round-trip functions.");
-
+
layer.textJustification = nil;
XCTAssertTrue(rawLayer->getTextJustify().isUndefined(),
@"Unsetting textJustification should return text-justify to the default value.");
XCTAssertEqualObjects(layer.textJustification, defaultStyleValue,
@"textJustification should return the default value after being unset.");
}
-
+
// text-letter-spacing
{
XCTAssertTrue(rawLayer->getTextLetterSpacing().isUndefined(),
@"text-letter-spacing should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.textLetterSpacing;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.textLetterSpacing = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -918,7 +918,7 @@
@"Setting textLetterSpacing to a constant value should update text-letter-spacing.");
XCTAssertEqualObjects(layer.textLetterSpacing, styleValue,
@"textLetterSpacing should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -931,20 +931,20 @@
@"Setting textLetterSpacing to a function should update text-letter-spacing.");
XCTAssertEqualObjects(layer.textLetterSpacing, styleValue,
@"textLetterSpacing should round-trip functions.");
-
+
layer.textLetterSpacing = nil;
XCTAssertTrue(rawLayer->getTextLetterSpacing().isUndefined(),
@"Unsetting textLetterSpacing should return text-letter-spacing to the default value.");
XCTAssertEqualObjects(layer.textLetterSpacing, defaultStyleValue,
@"textLetterSpacing should return the default value after being unset.");
}
-
+
// text-line-height
{
XCTAssertTrue(rawLayer->getTextLineHeight().isUndefined(),
@"text-line-height should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.textLineHeight;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.textLineHeight = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -952,7 +952,7 @@
@"Setting textLineHeight to a constant value should update text-line-height.");
XCTAssertEqualObjects(layer.textLineHeight, styleValue,
@"textLineHeight should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -965,20 +965,20 @@
@"Setting textLineHeight to a function should update text-line-height.");
XCTAssertEqualObjects(layer.textLineHeight, styleValue,
@"textLineHeight should round-trip functions.");
-
+
layer.textLineHeight = nil;
XCTAssertTrue(rawLayer->getTextLineHeight().isUndefined(),
@"Unsetting textLineHeight should return text-line-height to the default value.");
XCTAssertEqualObjects(layer.textLineHeight, defaultStyleValue,
@"textLineHeight should return the default value after being unset.");
}
-
+
// text-offset
{
XCTAssertTrue(rawLayer->getTextOffset().isUndefined(),
@"text-offset should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.textOffset;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:
#if TARGET_OS_IPHONE
[NSValue valueWithCGVector:CGVectorMake(1, 1)]
@@ -992,7 +992,7 @@
@"Setting textOffset to a constant value should update text-offset.");
XCTAssertEqualObjects(layer.textOffset, styleValue,
@"textOffset should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -1005,20 +1005,20 @@
@"Setting textOffset to a function should update text-offset.");
XCTAssertEqualObjects(layer.textOffset, styleValue,
@"textOffset should round-trip functions.");
-
+
layer.textOffset = nil;
XCTAssertTrue(rawLayer->getTextOffset().isUndefined(),
@"Unsetting textOffset should return text-offset to the default value.");
XCTAssertEqualObjects(layer.textOffset, defaultStyleValue,
@"textOffset should return the default value after being unset.");
}
-
+
// text-optional
{
XCTAssertTrue(rawLayer->getTextOptional().isUndefined(),
@"text-optional should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.textOptional;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@YES];
layer.textOptional = styleValue;
mbgl::style::PropertyValue<bool> propertyValue = { true };
@@ -1026,7 +1026,7 @@
@"Setting textOptional to a constant value should update text-optional.");
XCTAssertEqualObjects(layer.textOptional, styleValue,
@"textOptional should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -1039,20 +1039,20 @@
@"Setting textOptional to a function should update text-optional.");
XCTAssertEqualObjects(layer.textOptional, styleValue,
@"textOptional should round-trip functions.");
-
+
layer.textOptional = nil;
XCTAssertTrue(rawLayer->getTextOptional().isUndefined(),
@"Unsetting textOptional should return text-optional to the default value.");
XCTAssertEqualObjects(layer.textOptional, defaultStyleValue,
@"textOptional should return the default value after being unset.");
}
-
+
// text-padding
{
XCTAssertTrue(rawLayer->getTextPadding().isUndefined(),
@"text-padding should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.textPadding;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.textPadding = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -1060,7 +1060,7 @@
@"Setting textPadding to a constant value should update text-padding.");
XCTAssertEqualObjects(layer.textPadding, styleValue,
@"textPadding should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -1073,20 +1073,20 @@
@"Setting textPadding to a function should update text-padding.");
XCTAssertEqualObjects(layer.textPadding, styleValue,
@"textPadding should round-trip functions.");
-
+
layer.textPadding = nil;
XCTAssertTrue(rawLayer->getTextPadding().isUndefined(),
@"Unsetting textPadding should return text-padding to the default value.");
XCTAssertEqualObjects(layer.textPadding, defaultStyleValue,
@"textPadding should return the default value after being unset.");
}
-
+
// text-pitch-alignment
{
XCTAssertTrue(rawLayer->getTextPitchAlignment().isUndefined(),
@"text-pitch-alignment should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.textPitchAlignment;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLTextPitchAlignment:MGLTextPitchAlignmentAuto]];
layer.textPitchAlignment = styleValue;
mbgl::style::PropertyValue<mbgl::style::AlignmentType> propertyValue = { mbgl::style::AlignmentType::Auto };
@@ -1094,7 +1094,7 @@
@"Setting textPitchAlignment to a constant value should update text-pitch-alignment.");
XCTAssertEqualObjects(layer.textPitchAlignment, styleValue,
@"textPitchAlignment should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -1107,20 +1107,20 @@
@"Setting textPitchAlignment to a function should update text-pitch-alignment.");
XCTAssertEqualObjects(layer.textPitchAlignment, styleValue,
@"textPitchAlignment should round-trip functions.");
-
+
layer.textPitchAlignment = nil;
XCTAssertTrue(rawLayer->getTextPitchAlignment().isUndefined(),
@"Unsetting textPitchAlignment should return text-pitch-alignment to the default value.");
XCTAssertEqualObjects(layer.textPitchAlignment, defaultStyleValue,
@"textPitchAlignment should return the default value after being unset.");
}
-
+
// text-rotate
{
XCTAssertTrue(rawLayer->getTextRotate().isUndefined(),
@"text-rotate should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.textRotation;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.textRotation = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -1128,7 +1128,7 @@
@"Setting textRotation to a constant value should update text-rotate.");
XCTAssertEqualObjects(layer.textRotation, styleValue,
@"textRotation should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -1141,20 +1141,20 @@
@"Setting textRotation to a function should update text-rotate.");
XCTAssertEqualObjects(layer.textRotation, styleValue,
@"textRotation should round-trip functions.");
-
+
layer.textRotation = nil;
XCTAssertTrue(rawLayer->getTextRotate().isUndefined(),
@"Unsetting textRotation should return text-rotate to the default value.");
XCTAssertEqualObjects(layer.textRotation, defaultStyleValue,
@"textRotation should return the default value after being unset.");
}
-
+
// text-rotation-alignment
{
XCTAssertTrue(rawLayer->getTextRotationAlignment().isUndefined(),
@"text-rotation-alignment should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.textRotationAlignment;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLTextRotationAlignment:MGLTextRotationAlignmentAuto]];
layer.textRotationAlignment = styleValue;
mbgl::style::PropertyValue<mbgl::style::AlignmentType> propertyValue = { mbgl::style::AlignmentType::Auto };
@@ -1162,7 +1162,7 @@
@"Setting textRotationAlignment to a constant value should update text-rotation-alignment.");
XCTAssertEqualObjects(layer.textRotationAlignment, styleValue,
@"textRotationAlignment should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -1175,20 +1175,20 @@
@"Setting textRotationAlignment to a function should update text-rotation-alignment.");
XCTAssertEqualObjects(layer.textRotationAlignment, styleValue,
@"textRotationAlignment should round-trip functions.");
-
+
layer.textRotationAlignment = nil;
XCTAssertTrue(rawLayer->getTextRotationAlignment().isUndefined(),
@"Unsetting textRotationAlignment should return text-rotation-alignment to the default value.");
XCTAssertEqualObjects(layer.textRotationAlignment, defaultStyleValue,
@"textRotationAlignment should return the default value after being unset.");
}
-
+
// text-transform
{
XCTAssertTrue(rawLayer->getTextTransform().isUndefined(),
@"text-transform should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.textTransform;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLTextTransform:MGLTextTransformLowercase]];
layer.textTransform = styleValue;
mbgl::style::PropertyValue<mbgl::style::TextTransformType> propertyValue = { mbgl::style::TextTransformType::Lowercase };
@@ -1196,7 +1196,7 @@
@"Setting textTransform to a constant value should update text-transform.");
XCTAssertEqualObjects(layer.textTransform, styleValue,
@"textTransform should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -1209,20 +1209,20 @@
@"Setting textTransform to a function should update text-transform.");
XCTAssertEqualObjects(layer.textTransform, styleValue,
@"textTransform should round-trip functions.");
-
+
layer.textTransform = nil;
XCTAssertTrue(rawLayer->getTextTransform().isUndefined(),
@"Unsetting textTransform should return text-transform to the default value.");
XCTAssertEqualObjects(layer.textTransform, defaultStyleValue,
@"textTransform should return the default value after being unset.");
}
-
+
// icon-color
{
XCTAssertTrue(rawLayer->getIconColor().isUndefined(),
@"icon-color should be unset initially.");
MGLStyleValue<MGLColor *> *defaultStyleValue = layer.iconColor;
-
+
MGLStyleValue<MGLColor *> *styleValue = [MGLStyleValue<MGLColor *> valueWithRawValue:[MGLColor redColor]];
layer.iconColor = styleValue;
mbgl::style::PropertyValue<mbgl::Color> propertyValue = { { 1, 0, 0, 1 } };
@@ -1230,7 +1230,7 @@
@"Setting iconColor to a constant value should update icon-color.");
XCTAssertEqualObjects(layer.iconColor, styleValue,
@"iconColor should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<MGLColor *> valueWithStops:@{
@18: styleValue,
}];
@@ -1243,20 +1243,20 @@
@"Setting iconColor to a function should update icon-color.");
XCTAssertEqualObjects(layer.iconColor, styleValue,
@"iconColor should round-trip functions.");
-
+
layer.iconColor = nil;
XCTAssertTrue(rawLayer->getIconColor().isUndefined(),
@"Unsetting iconColor should return icon-color to the default value.");
XCTAssertEqualObjects(layer.iconColor, defaultStyleValue,
@"iconColor should return the default value after being unset.");
}
-
+
// icon-halo-blur
{
XCTAssertTrue(rawLayer->getIconHaloBlur().isUndefined(),
@"icon-halo-blur should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.iconHaloBlur;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.iconHaloBlur = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -1264,7 +1264,7 @@
@"Setting iconHaloBlur to a constant value should update icon-halo-blur.");
XCTAssertEqualObjects(layer.iconHaloBlur, styleValue,
@"iconHaloBlur should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -1277,20 +1277,20 @@
@"Setting iconHaloBlur to a function should update icon-halo-blur.");
XCTAssertEqualObjects(layer.iconHaloBlur, styleValue,
@"iconHaloBlur should round-trip functions.");
-
+
layer.iconHaloBlur = nil;
XCTAssertTrue(rawLayer->getIconHaloBlur().isUndefined(),
@"Unsetting iconHaloBlur should return icon-halo-blur to the default value.");
XCTAssertEqualObjects(layer.iconHaloBlur, defaultStyleValue,
@"iconHaloBlur should return the default value after being unset.");
}
-
+
// icon-halo-color
{
XCTAssertTrue(rawLayer->getIconHaloColor().isUndefined(),
@"icon-halo-color should be unset initially.");
MGLStyleValue<MGLColor *> *defaultStyleValue = layer.iconHaloColor;
-
+
MGLStyleValue<MGLColor *> *styleValue = [MGLStyleValue<MGLColor *> valueWithRawValue:[MGLColor redColor]];
layer.iconHaloColor = styleValue;
mbgl::style::PropertyValue<mbgl::Color> propertyValue = { { 1, 0, 0, 1 } };
@@ -1298,7 +1298,7 @@
@"Setting iconHaloColor to a constant value should update icon-halo-color.");
XCTAssertEqualObjects(layer.iconHaloColor, styleValue,
@"iconHaloColor should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<MGLColor *> valueWithStops:@{
@18: styleValue,
}];
@@ -1311,20 +1311,20 @@
@"Setting iconHaloColor to a function should update icon-halo-color.");
XCTAssertEqualObjects(layer.iconHaloColor, styleValue,
@"iconHaloColor should round-trip functions.");
-
+
layer.iconHaloColor = nil;
XCTAssertTrue(rawLayer->getIconHaloColor().isUndefined(),
@"Unsetting iconHaloColor should return icon-halo-color to the default value.");
XCTAssertEqualObjects(layer.iconHaloColor, defaultStyleValue,
@"iconHaloColor should return the default value after being unset.");
}
-
+
// icon-halo-width
{
XCTAssertTrue(rawLayer->getIconHaloWidth().isUndefined(),
@"icon-halo-width should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.iconHaloWidth;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.iconHaloWidth = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -1332,7 +1332,7 @@
@"Setting iconHaloWidth to a constant value should update icon-halo-width.");
XCTAssertEqualObjects(layer.iconHaloWidth, styleValue,
@"iconHaloWidth should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -1345,20 +1345,20 @@
@"Setting iconHaloWidth to a function should update icon-halo-width.");
XCTAssertEqualObjects(layer.iconHaloWidth, styleValue,
@"iconHaloWidth should round-trip functions.");
-
+
layer.iconHaloWidth = nil;
XCTAssertTrue(rawLayer->getIconHaloWidth().isUndefined(),
@"Unsetting iconHaloWidth should return icon-halo-width to the default value.");
XCTAssertEqualObjects(layer.iconHaloWidth, defaultStyleValue,
@"iconHaloWidth should return the default value after being unset.");
}
-
+
// icon-opacity
{
XCTAssertTrue(rawLayer->getIconOpacity().isUndefined(),
@"icon-opacity should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.iconOpacity;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.iconOpacity = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -1366,7 +1366,7 @@
@"Setting iconOpacity to a constant value should update icon-opacity.");
XCTAssertEqualObjects(layer.iconOpacity, styleValue,
@"iconOpacity should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -1379,20 +1379,20 @@
@"Setting iconOpacity to a function should update icon-opacity.");
XCTAssertEqualObjects(layer.iconOpacity, styleValue,
@"iconOpacity should round-trip functions.");
-
+
layer.iconOpacity = nil;
XCTAssertTrue(rawLayer->getIconOpacity().isUndefined(),
@"Unsetting iconOpacity should return icon-opacity to the default value.");
XCTAssertEqualObjects(layer.iconOpacity, defaultStyleValue,
@"iconOpacity should return the default value after being unset.");
}
-
+
// icon-translate
{
XCTAssertTrue(rawLayer->getIconTranslate().isUndefined(),
@"icon-translate should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.iconTranslation;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:
#if TARGET_OS_IPHONE
[NSValue valueWithCGVector:CGVectorMake(1, 1)]
@@ -1406,7 +1406,7 @@
@"Setting iconTranslation to a constant value should update icon-translate.");
XCTAssertEqualObjects(layer.iconTranslation, styleValue,
@"iconTranslation should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -1419,20 +1419,20 @@
@"Setting iconTranslation to a function should update icon-translate.");
XCTAssertEqualObjects(layer.iconTranslation, styleValue,
@"iconTranslation should round-trip functions.");
-
+
layer.iconTranslation = nil;
XCTAssertTrue(rawLayer->getIconTranslate().isUndefined(),
@"Unsetting iconTranslation should return icon-translate to the default value.");
XCTAssertEqualObjects(layer.iconTranslation, defaultStyleValue,
@"iconTranslation should return the default value after being unset.");
}
-
+
// icon-translate-anchor
{
XCTAssertTrue(rawLayer->getIconTranslateAnchor().isUndefined(),
@"icon-translate-anchor should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.iconTranslationAnchor;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLIconTranslationAnchor:MGLIconTranslationAnchorViewport]];
layer.iconTranslationAnchor = styleValue;
mbgl::style::PropertyValue<mbgl::style::TranslateAnchorType> propertyValue = { mbgl::style::TranslateAnchorType::Viewport };
@@ -1440,7 +1440,7 @@
@"Setting iconTranslationAnchor to a constant value should update icon-translate-anchor.");
XCTAssertEqualObjects(layer.iconTranslationAnchor, styleValue,
@"iconTranslationAnchor should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -1453,20 +1453,20 @@
@"Setting iconTranslationAnchor to a function should update icon-translate-anchor.");
XCTAssertEqualObjects(layer.iconTranslationAnchor, styleValue,
@"iconTranslationAnchor should round-trip functions.");
-
+
layer.iconTranslationAnchor = nil;
XCTAssertTrue(rawLayer->getIconTranslateAnchor().isUndefined(),
@"Unsetting iconTranslationAnchor should return icon-translate-anchor to the default value.");
XCTAssertEqualObjects(layer.iconTranslationAnchor, defaultStyleValue,
@"iconTranslationAnchor should return the default value after being unset.");
}
-
+
// text-color
{
XCTAssertTrue(rawLayer->getTextColor().isUndefined(),
@"text-color should be unset initially.");
MGLStyleValue<MGLColor *> *defaultStyleValue = layer.textColor;
-
+
MGLStyleValue<MGLColor *> *styleValue = [MGLStyleValue<MGLColor *> valueWithRawValue:[MGLColor redColor]];
layer.textColor = styleValue;
mbgl::style::PropertyValue<mbgl::Color> propertyValue = { { 1, 0, 0, 1 } };
@@ -1474,7 +1474,7 @@
@"Setting textColor to a constant value should update text-color.");
XCTAssertEqualObjects(layer.textColor, styleValue,
@"textColor should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<MGLColor *> valueWithStops:@{
@18: styleValue,
}];
@@ -1487,20 +1487,20 @@
@"Setting textColor to a function should update text-color.");
XCTAssertEqualObjects(layer.textColor, styleValue,
@"textColor should round-trip functions.");
-
+
layer.textColor = nil;
XCTAssertTrue(rawLayer->getTextColor().isUndefined(),
@"Unsetting textColor should return text-color to the default value.");
XCTAssertEqualObjects(layer.textColor, defaultStyleValue,
@"textColor should return the default value after being unset.");
}
-
+
// text-halo-blur
{
XCTAssertTrue(rawLayer->getTextHaloBlur().isUndefined(),
@"text-halo-blur should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.textHaloBlur;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.textHaloBlur = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -1508,7 +1508,7 @@
@"Setting textHaloBlur to a constant value should update text-halo-blur.");
XCTAssertEqualObjects(layer.textHaloBlur, styleValue,
@"textHaloBlur should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -1521,20 +1521,20 @@
@"Setting textHaloBlur to a function should update text-halo-blur.");
XCTAssertEqualObjects(layer.textHaloBlur, styleValue,
@"textHaloBlur should round-trip functions.");
-
+
layer.textHaloBlur = nil;
XCTAssertTrue(rawLayer->getTextHaloBlur().isUndefined(),
@"Unsetting textHaloBlur should return text-halo-blur to the default value.");
XCTAssertEqualObjects(layer.textHaloBlur, defaultStyleValue,
@"textHaloBlur should return the default value after being unset.");
}
-
+
// text-halo-color
{
XCTAssertTrue(rawLayer->getTextHaloColor().isUndefined(),
@"text-halo-color should be unset initially.");
MGLStyleValue<MGLColor *> *defaultStyleValue = layer.textHaloColor;
-
+
MGLStyleValue<MGLColor *> *styleValue = [MGLStyleValue<MGLColor *> valueWithRawValue:[MGLColor redColor]];
layer.textHaloColor = styleValue;
mbgl::style::PropertyValue<mbgl::Color> propertyValue = { { 1, 0, 0, 1 } };
@@ -1542,7 +1542,7 @@
@"Setting textHaloColor to a constant value should update text-halo-color.");
XCTAssertEqualObjects(layer.textHaloColor, styleValue,
@"textHaloColor should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<MGLColor *> valueWithStops:@{
@18: styleValue,
}];
@@ -1555,20 +1555,20 @@
@"Setting textHaloColor to a function should update text-halo-color.");
XCTAssertEqualObjects(layer.textHaloColor, styleValue,
@"textHaloColor should round-trip functions.");
-
+
layer.textHaloColor = nil;
XCTAssertTrue(rawLayer->getTextHaloColor().isUndefined(),
@"Unsetting textHaloColor should return text-halo-color to the default value.");
XCTAssertEqualObjects(layer.textHaloColor, defaultStyleValue,
@"textHaloColor should return the default value after being unset.");
}
-
+
// text-halo-width
{
XCTAssertTrue(rawLayer->getTextHaloWidth().isUndefined(),
@"text-halo-width should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.textHaloWidth;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.textHaloWidth = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -1576,7 +1576,7 @@
@"Setting textHaloWidth to a constant value should update text-halo-width.");
XCTAssertEqualObjects(layer.textHaloWidth, styleValue,
@"textHaloWidth should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -1589,20 +1589,20 @@
@"Setting textHaloWidth to a function should update text-halo-width.");
XCTAssertEqualObjects(layer.textHaloWidth, styleValue,
@"textHaloWidth should round-trip functions.");
-
+
layer.textHaloWidth = nil;
XCTAssertTrue(rawLayer->getTextHaloWidth().isUndefined(),
@"Unsetting textHaloWidth should return text-halo-width to the default value.");
XCTAssertEqualObjects(layer.textHaloWidth, defaultStyleValue,
@"textHaloWidth should return the default value after being unset.");
}
-
+
// text-opacity
{
XCTAssertTrue(rawLayer->getTextOpacity().isUndefined(),
@"text-opacity should be unset initially.");
MGLStyleValue<NSNumber *> *defaultStyleValue = layer.textOpacity;
-
+
MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff];
layer.textOpacity = styleValue;
mbgl::style::PropertyValue<float> propertyValue = { 0xff };
@@ -1610,7 +1610,7 @@
@"Setting textOpacity to a constant value should update text-opacity.");
XCTAssertEqualObjects(layer.textOpacity, styleValue,
@"textOpacity should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{
@18: styleValue,
}];
@@ -1623,20 +1623,20 @@
@"Setting textOpacity to a function should update text-opacity.");
XCTAssertEqualObjects(layer.textOpacity, styleValue,
@"textOpacity should round-trip functions.");
-
+
layer.textOpacity = nil;
XCTAssertTrue(rawLayer->getTextOpacity().isUndefined(),
@"Unsetting textOpacity should return text-opacity to the default value.");
XCTAssertEqualObjects(layer.textOpacity, defaultStyleValue,
@"textOpacity should return the default value after being unset.");
}
-
+
// text-translate
{
XCTAssertTrue(rawLayer->getTextTranslate().isUndefined(),
@"text-translate should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.textTranslation;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:
#if TARGET_OS_IPHONE
[NSValue valueWithCGVector:CGVectorMake(1, 1)]
@@ -1650,7 +1650,7 @@
@"Setting textTranslation to a constant value should update text-translate.");
XCTAssertEqualObjects(layer.textTranslation, styleValue,
@"textTranslation should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -1663,20 +1663,20 @@
@"Setting textTranslation to a function should update text-translate.");
XCTAssertEqualObjects(layer.textTranslation, styleValue,
@"textTranslation should round-trip functions.");
-
+
layer.textTranslation = nil;
XCTAssertTrue(rawLayer->getTextTranslate().isUndefined(),
@"Unsetting textTranslation should return text-translate to the default value.");
XCTAssertEqualObjects(layer.textTranslation, defaultStyleValue,
@"textTranslation should return the default value after being unset.");
}
-
+
// text-translate-anchor
{
XCTAssertTrue(rawLayer->getTextTranslateAnchor().isUndefined(),
@"text-translate-anchor should be unset initially.");
MGLStyleValue<NSValue *> *defaultStyleValue = layer.textTranslationAnchor;
-
+
MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLTextTranslationAnchor:MGLTextTranslationAnchorViewport]];
layer.textTranslationAnchor = styleValue;
mbgl::style::PropertyValue<mbgl::style::TranslateAnchorType> propertyValue = { mbgl::style::TranslateAnchorType::Viewport };
@@ -1684,7 +1684,7 @@
@"Setting textTranslationAnchor to a constant value should update text-translate-anchor.");
XCTAssertEqualObjects(layer.textTranslationAnchor, styleValue,
@"textTranslationAnchor should round-trip constant values.");
-
+
styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{
@18: styleValue,
}];
@@ -1697,7 +1697,7 @@
@"Setting textTranslationAnchor to a function should update text-translate-anchor.");
XCTAssertEqualObjects(layer.textTranslationAnchor, styleValue,
@"textTranslationAnchor should round-trip functions.");
-
+
layer.textTranslationAnchor = nil;
XCTAssertTrue(rawLayer->getTextTranslateAnchor().isUndefined(),
@"Unsetting textTranslationAnchor should return text-translate-anchor to the default value.");