diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-01-26 18:52:44 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-01-27 11:44:16 +0100 |
commit | 62ea1f21858c69f6921c775ba7a3de201f0514d8 (patch) | |
tree | 7a4da88706e8a5513e1e13e993b2acc212cae3b1 /platform/darwin/test/MGLCircleStyleLayerTests.mm | |
parent | a662508ddde4043ece36d8ea9b424368891d892c (diff) | |
download | qtlocation-mapboxgl-62ea1f21858c69f6921c775ba7a3de201f0514d8.tar.gz |
[core] remove trailing whitespace, add trailing newlines, add space after //
Diffstat (limited to 'platform/darwin/test/MGLCircleStyleLayerTests.mm')
-rw-r--r-- | platform/darwin/test/MGLCircleStyleLayerTests.mm | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/platform/darwin/test/MGLCircleStyleLayerTests.mm b/platform/darwin/test/MGLCircleStyleLayerTests.mm index 35e29b31d5..b8eb84a567 100644 --- a/platform/darwin/test/MGLCircleStyleLayerTests.mm +++ b/platform/darwin/test/MGLCircleStyleLayerTests.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]; MGLCircleStyleLayer *layer = [[MGLCircleStyleLayer 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]; - + MGLCircleStyleLayer *layer = [[MGLCircleStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; XCTAssertNotEqual(layer.rawLayer, nullptr); XCTAssertTrue(layer.rawLayer->is<mbgl::style::CircleLayer>()); auto rawLayer = layer.rawLayer->as<mbgl::style::CircleLayer>(); - + // circle-blur { XCTAssertTrue(rawLayer->getCircleBlur().isUndefined(), @"circle-blur should be unset initially."); MGLStyleValue<NSNumber *> *defaultStyleValue = layer.circleBlur; - + MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff]; layer.circleBlur = styleValue; mbgl::style::PropertyValue<float> propertyValue = { 0xff }; @@ -56,7 +56,7 @@ @"Setting circleBlur to a constant value should update circle-blur."); XCTAssertEqualObjects(layer.circleBlur, styleValue, @"circleBlur should round-trip constant values."); - + styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{ @18: styleValue, }]; @@ -69,20 +69,20 @@ @"Setting circleBlur to a function should update circle-blur."); XCTAssertEqualObjects(layer.circleBlur, styleValue, @"circleBlur should round-trip functions."); - + layer.circleBlur = nil; XCTAssertTrue(rawLayer->getCircleBlur().isUndefined(), @"Unsetting circleBlur should return circle-blur to the default value."); XCTAssertEqualObjects(layer.circleBlur, defaultStyleValue, @"circleBlur should return the default value after being unset."); } - + // circle-color { XCTAssertTrue(rawLayer->getCircleColor().isUndefined(), @"circle-color should be unset initially."); MGLStyleValue<MGLColor *> *defaultStyleValue = layer.circleColor; - + MGLStyleValue<MGLColor *> *styleValue = [MGLStyleValue<MGLColor *> valueWithRawValue:[MGLColor redColor]]; layer.circleColor = styleValue; mbgl::style::PropertyValue<mbgl::Color> propertyValue = { { 1, 0, 0, 1 } }; @@ -90,7 +90,7 @@ @"Setting circleColor to a constant value should update circle-color."); XCTAssertEqualObjects(layer.circleColor, styleValue, @"circleColor should round-trip constant values."); - + styleValue = [MGLStyleValue<MGLColor *> valueWithStops:@{ @18: styleValue, }]; @@ -103,20 +103,20 @@ @"Setting circleColor to a function should update circle-color."); XCTAssertEqualObjects(layer.circleColor, styleValue, @"circleColor should round-trip functions."); - + layer.circleColor = nil; XCTAssertTrue(rawLayer->getCircleColor().isUndefined(), @"Unsetting circleColor should return circle-color to the default value."); XCTAssertEqualObjects(layer.circleColor, defaultStyleValue, @"circleColor should return the default value after being unset."); } - + // circle-opacity { XCTAssertTrue(rawLayer->getCircleOpacity().isUndefined(), @"circle-opacity should be unset initially."); MGLStyleValue<NSNumber *> *defaultStyleValue = layer.circleOpacity; - + MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff]; layer.circleOpacity = styleValue; mbgl::style::PropertyValue<float> propertyValue = { 0xff }; @@ -124,7 +124,7 @@ @"Setting circleOpacity to a constant value should update circle-opacity."); XCTAssertEqualObjects(layer.circleOpacity, styleValue, @"circleOpacity should round-trip constant values."); - + styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{ @18: styleValue, }]; @@ -137,20 +137,20 @@ @"Setting circleOpacity to a function should update circle-opacity."); XCTAssertEqualObjects(layer.circleOpacity, styleValue, @"circleOpacity should round-trip functions."); - + layer.circleOpacity = nil; XCTAssertTrue(rawLayer->getCircleOpacity().isUndefined(), @"Unsetting circleOpacity should return circle-opacity to the default value."); XCTAssertEqualObjects(layer.circleOpacity, defaultStyleValue, @"circleOpacity should return the default value after being unset."); } - + // circle-radius { XCTAssertTrue(rawLayer->getCircleRadius().isUndefined(), @"circle-radius should be unset initially."); MGLStyleValue<NSNumber *> *defaultStyleValue = layer.circleRadius; - + MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff]; layer.circleRadius = styleValue; mbgl::style::PropertyValue<float> propertyValue = { 0xff }; @@ -158,7 +158,7 @@ @"Setting circleRadius to a constant value should update circle-radius."); XCTAssertEqualObjects(layer.circleRadius, styleValue, @"circleRadius should round-trip constant values."); - + styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{ @18: styleValue, }]; @@ -171,20 +171,20 @@ @"Setting circleRadius to a function should update circle-radius."); XCTAssertEqualObjects(layer.circleRadius, styleValue, @"circleRadius should round-trip functions."); - + layer.circleRadius = nil; XCTAssertTrue(rawLayer->getCircleRadius().isUndefined(), @"Unsetting circleRadius should return circle-radius to the default value."); XCTAssertEqualObjects(layer.circleRadius, defaultStyleValue, @"circleRadius should return the default value after being unset."); } - + // circle-pitch-scale { XCTAssertTrue(rawLayer->getCirclePitchScale().isUndefined(), @"circle-pitch-scale should be unset initially."); MGLStyleValue<NSValue *> *defaultStyleValue = layer.circleScaleAlignment; - + MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLCircleScaleAlignment:MGLCircleScaleAlignmentViewport]]; layer.circleScaleAlignment = styleValue; mbgl::style::PropertyValue<mbgl::style::CirclePitchScaleType> propertyValue = { mbgl::style::CirclePitchScaleType::Viewport }; @@ -192,7 +192,7 @@ @"Setting circleScaleAlignment to a constant value should update circle-pitch-scale."); XCTAssertEqualObjects(layer.circleScaleAlignment, styleValue, @"circleScaleAlignment should round-trip constant values."); - + styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{ @18: styleValue, }]; @@ -205,20 +205,20 @@ @"Setting circleScaleAlignment to a function should update circle-pitch-scale."); XCTAssertEqualObjects(layer.circleScaleAlignment, styleValue, @"circleScaleAlignment should round-trip functions."); - + layer.circleScaleAlignment = nil; XCTAssertTrue(rawLayer->getCirclePitchScale().isUndefined(), @"Unsetting circleScaleAlignment should return circle-pitch-scale to the default value."); XCTAssertEqualObjects(layer.circleScaleAlignment, defaultStyleValue, @"circleScaleAlignment should return the default value after being unset."); } - + // circle-stroke-color { XCTAssertTrue(rawLayer->getCircleStrokeColor().isUndefined(), @"circle-stroke-color should be unset initially."); MGLStyleValue<MGLColor *> *defaultStyleValue = layer.circleStrokeColor; - + MGLStyleValue<MGLColor *> *styleValue = [MGLStyleValue<MGLColor *> valueWithRawValue:[MGLColor redColor]]; layer.circleStrokeColor = styleValue; mbgl::style::PropertyValue<mbgl::Color> propertyValue = { { 1, 0, 0, 1 } }; @@ -226,7 +226,7 @@ @"Setting circleStrokeColor to a constant value should update circle-stroke-color."); XCTAssertEqualObjects(layer.circleStrokeColor, styleValue, @"circleStrokeColor should round-trip constant values."); - + styleValue = [MGLStyleValue<MGLColor *> valueWithStops:@{ @18: styleValue, }]; @@ -239,20 +239,20 @@ @"Setting circleStrokeColor to a function should update circle-stroke-color."); XCTAssertEqualObjects(layer.circleStrokeColor, styleValue, @"circleStrokeColor should round-trip functions."); - + layer.circleStrokeColor = nil; XCTAssertTrue(rawLayer->getCircleStrokeColor().isUndefined(), @"Unsetting circleStrokeColor should return circle-stroke-color to the default value."); XCTAssertEqualObjects(layer.circleStrokeColor, defaultStyleValue, @"circleStrokeColor should return the default value after being unset."); } - + // circle-stroke-opacity { XCTAssertTrue(rawLayer->getCircleStrokeOpacity().isUndefined(), @"circle-stroke-opacity should be unset initially."); MGLStyleValue<NSNumber *> *defaultStyleValue = layer.circleStrokeOpacity; - + MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff]; layer.circleStrokeOpacity = styleValue; mbgl::style::PropertyValue<float> propertyValue = { 0xff }; @@ -260,7 +260,7 @@ @"Setting circleStrokeOpacity to a constant value should update circle-stroke-opacity."); XCTAssertEqualObjects(layer.circleStrokeOpacity, styleValue, @"circleStrokeOpacity should round-trip constant values."); - + styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{ @18: styleValue, }]; @@ -273,20 +273,20 @@ @"Setting circleStrokeOpacity to a function should update circle-stroke-opacity."); XCTAssertEqualObjects(layer.circleStrokeOpacity, styleValue, @"circleStrokeOpacity should round-trip functions."); - + layer.circleStrokeOpacity = nil; XCTAssertTrue(rawLayer->getCircleStrokeOpacity().isUndefined(), @"Unsetting circleStrokeOpacity should return circle-stroke-opacity to the default value."); XCTAssertEqualObjects(layer.circleStrokeOpacity, defaultStyleValue, @"circleStrokeOpacity should return the default value after being unset."); } - + // circle-stroke-width { XCTAssertTrue(rawLayer->getCircleStrokeWidth().isUndefined(), @"circle-stroke-width should be unset initially."); MGLStyleValue<NSNumber *> *defaultStyleValue = layer.circleStrokeWidth; - + MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff]; layer.circleStrokeWidth = styleValue; mbgl::style::PropertyValue<float> propertyValue = { 0xff }; @@ -294,7 +294,7 @@ @"Setting circleStrokeWidth to a constant value should update circle-stroke-width."); XCTAssertEqualObjects(layer.circleStrokeWidth, styleValue, @"circleStrokeWidth should round-trip constant values."); - + styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{ @18: styleValue, }]; @@ -307,20 +307,20 @@ @"Setting circleStrokeWidth to a function should update circle-stroke-width."); XCTAssertEqualObjects(layer.circleStrokeWidth, styleValue, @"circleStrokeWidth should round-trip functions."); - + layer.circleStrokeWidth = nil; XCTAssertTrue(rawLayer->getCircleStrokeWidth().isUndefined(), @"Unsetting circleStrokeWidth should return circle-stroke-width to the default value."); XCTAssertEqualObjects(layer.circleStrokeWidth, defaultStyleValue, @"circleStrokeWidth should return the default value after being unset."); } - + // circle-translate { XCTAssertTrue(rawLayer->getCircleTranslate().isUndefined(), @"circle-translate should be unset initially."); MGLStyleValue<NSValue *> *defaultStyleValue = layer.circleTranslation; - + MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue: #if TARGET_OS_IPHONE [NSValue valueWithCGVector:CGVectorMake(1, 1)] @@ -334,7 +334,7 @@ @"Setting circleTranslation to a constant value should update circle-translate."); XCTAssertEqualObjects(layer.circleTranslation, styleValue, @"circleTranslation should round-trip constant values."); - + styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{ @18: styleValue, }]; @@ -347,20 +347,20 @@ @"Setting circleTranslation to a function should update circle-translate."); XCTAssertEqualObjects(layer.circleTranslation, styleValue, @"circleTranslation should round-trip functions."); - + layer.circleTranslation = nil; XCTAssertTrue(rawLayer->getCircleTranslate().isUndefined(), @"Unsetting circleTranslation should return circle-translate to the default value."); XCTAssertEqualObjects(layer.circleTranslation, defaultStyleValue, @"circleTranslation should return the default value after being unset."); } - + // circle-translate-anchor { XCTAssertTrue(rawLayer->getCircleTranslateAnchor().isUndefined(), @"circle-translate-anchor should be unset initially."); MGLStyleValue<NSValue *> *defaultStyleValue = layer.circleTranslationAnchor; - + MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLCircleTranslationAnchor:MGLCircleTranslationAnchorViewport]]; layer.circleTranslationAnchor = styleValue; mbgl::style::PropertyValue<mbgl::style::TranslateAnchorType> propertyValue = { mbgl::style::TranslateAnchorType::Viewport }; @@ -368,7 +368,7 @@ @"Setting circleTranslationAnchor to a constant value should update circle-translate-anchor."); XCTAssertEqualObjects(layer.circleTranslationAnchor, styleValue, @"circleTranslationAnchor should round-trip constant values."); - + styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{ @18: styleValue, }]; @@ -381,7 +381,7 @@ @"Setting circleTranslationAnchor to a function should update circle-translate-anchor."); XCTAssertEqualObjects(layer.circleTranslationAnchor, styleValue, @"circleTranslationAnchor should round-trip functions."); - + layer.circleTranslationAnchor = nil; XCTAssertTrue(rawLayer->getCircleTranslateAnchor().isUndefined(), @"Unsetting circleTranslationAnchor should return circle-translate-anchor to the default value."); |