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/MGLLineStyleLayerTests.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/MGLLineStyleLayerTests.mm')
-rw-r--r-- | platform/darwin/test/MGLLineStyleLayerTests.mm | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/platform/darwin/test/MGLLineStyleLayerTests.mm b/platform/darwin/test/MGLLineStyleLayerTests.mm index 24a9d7afea..3d0a4133e9 100644 --- a/platform/darwin/test/MGLLineStyleLayerTests.mm +++ b/platform/darwin/test/MGLLineStyleLayerTests.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]; MGLLineStyleLayer *layer = [[MGLLineStyleLayer 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]; - + MGLLineStyleLayer *layer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; XCTAssertNotEqual(layer.rawLayer, nullptr); XCTAssertTrue(layer.rawLayer->is<mbgl::style::LineLayer>()); auto rawLayer = layer.rawLayer->as<mbgl::style::LineLayer>(); - + // line-cap { XCTAssertTrue(rawLayer->getLineCap().isUndefined(), @"line-cap should be unset initially."); MGLStyleValue<NSValue *> *defaultStyleValue = layer.lineCap; - + MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLLineCap:MGLLineCapSquare]]; layer.lineCap = styleValue; mbgl::style::PropertyValue<mbgl::style::LineCapType> propertyValue = { mbgl::style::LineCapType::Square }; @@ -56,7 +56,7 @@ @"Setting lineCap to a constant value should update line-cap."); XCTAssertEqualObjects(layer.lineCap, styleValue, @"lineCap should round-trip constant values."); - + styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{ @18: styleValue, }]; @@ -69,20 +69,20 @@ @"Setting lineCap to a function should update line-cap."); XCTAssertEqualObjects(layer.lineCap, styleValue, @"lineCap should round-trip functions."); - + layer.lineCap = nil; XCTAssertTrue(rawLayer->getLineCap().isUndefined(), @"Unsetting lineCap should return line-cap to the default value."); XCTAssertEqualObjects(layer.lineCap, defaultStyleValue, @"lineCap should return the default value after being unset."); } - + // line-join { XCTAssertTrue(rawLayer->getLineJoin().isUndefined(), @"line-join should be unset initially."); MGLStyleValue<NSValue *> *defaultStyleValue = layer.lineJoin; - + MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLLineJoin:MGLLineJoinMiter]]; layer.lineJoin = styleValue; mbgl::style::PropertyValue<mbgl::style::LineJoinType> propertyValue = { mbgl::style::LineJoinType::Miter }; @@ -90,7 +90,7 @@ @"Setting lineJoin to a constant value should update line-join."); XCTAssertEqualObjects(layer.lineJoin, styleValue, @"lineJoin should round-trip constant values."); - + styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{ @18: styleValue, }]; @@ -103,20 +103,20 @@ @"Setting lineJoin to a function should update line-join."); XCTAssertEqualObjects(layer.lineJoin, styleValue, @"lineJoin should round-trip functions."); - + layer.lineJoin = nil; XCTAssertTrue(rawLayer->getLineJoin().isUndefined(), @"Unsetting lineJoin should return line-join to the default value."); XCTAssertEqualObjects(layer.lineJoin, defaultStyleValue, @"lineJoin should return the default value after being unset."); } - + // line-miter-limit { XCTAssertTrue(rawLayer->getLineMiterLimit().isUndefined(), @"line-miter-limit should be unset initially."); MGLStyleValue<NSNumber *> *defaultStyleValue = layer.lineMiterLimit; - + MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff]; layer.lineMiterLimit = styleValue; mbgl::style::PropertyValue<float> propertyValue = { 0xff }; @@ -124,7 +124,7 @@ @"Setting lineMiterLimit to a constant value should update line-miter-limit."); XCTAssertEqualObjects(layer.lineMiterLimit, styleValue, @"lineMiterLimit should round-trip constant values."); - + styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{ @18: styleValue, }]; @@ -137,20 +137,20 @@ @"Setting lineMiterLimit to a function should update line-miter-limit."); XCTAssertEqualObjects(layer.lineMiterLimit, styleValue, @"lineMiterLimit should round-trip functions."); - + layer.lineMiterLimit = nil; XCTAssertTrue(rawLayer->getLineMiterLimit().isUndefined(), @"Unsetting lineMiterLimit should return line-miter-limit to the default value."); XCTAssertEqualObjects(layer.lineMiterLimit, defaultStyleValue, @"lineMiterLimit should return the default value after being unset."); } - + // line-round-limit { XCTAssertTrue(rawLayer->getLineRoundLimit().isUndefined(), @"line-round-limit should be unset initially."); MGLStyleValue<NSNumber *> *defaultStyleValue = layer.lineRoundLimit; - + MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff]; layer.lineRoundLimit = styleValue; mbgl::style::PropertyValue<float> propertyValue = { 0xff }; @@ -158,7 +158,7 @@ @"Setting lineRoundLimit to a constant value should update line-round-limit."); XCTAssertEqualObjects(layer.lineRoundLimit, styleValue, @"lineRoundLimit should round-trip constant values."); - + styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{ @18: styleValue, }]; @@ -171,20 +171,20 @@ @"Setting lineRoundLimit to a function should update line-round-limit."); XCTAssertEqualObjects(layer.lineRoundLimit, styleValue, @"lineRoundLimit should round-trip functions."); - + layer.lineRoundLimit = nil; XCTAssertTrue(rawLayer->getLineRoundLimit().isUndefined(), @"Unsetting lineRoundLimit should return line-round-limit to the default value."); XCTAssertEqualObjects(layer.lineRoundLimit, defaultStyleValue, @"lineRoundLimit should return the default value after being unset."); } - + // line-blur { XCTAssertTrue(rawLayer->getLineBlur().isUndefined(), @"line-blur should be unset initially."); MGLStyleValue<NSNumber *> *defaultStyleValue = layer.lineBlur; - + MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff]; layer.lineBlur = styleValue; mbgl::style::PropertyValue<float> propertyValue = { 0xff }; @@ -192,7 +192,7 @@ @"Setting lineBlur to a constant value should update line-blur."); XCTAssertEqualObjects(layer.lineBlur, styleValue, @"lineBlur should round-trip constant values."); - + styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{ @18: styleValue, }]; @@ -205,20 +205,20 @@ @"Setting lineBlur to a function should update line-blur."); XCTAssertEqualObjects(layer.lineBlur, styleValue, @"lineBlur should round-trip functions."); - + layer.lineBlur = nil; XCTAssertTrue(rawLayer->getLineBlur().isUndefined(), @"Unsetting lineBlur should return line-blur to the default value."); XCTAssertEqualObjects(layer.lineBlur, defaultStyleValue, @"lineBlur should return the default value after being unset."); } - + // line-color { XCTAssertTrue(rawLayer->getLineColor().isUndefined(), @"line-color should be unset initially."); MGLStyleValue<MGLColor *> *defaultStyleValue = layer.lineColor; - + MGLStyleValue<MGLColor *> *styleValue = [MGLStyleValue<MGLColor *> valueWithRawValue:[MGLColor redColor]]; layer.lineColor = styleValue; mbgl::style::PropertyValue<mbgl::Color> propertyValue = { { 1, 0, 0, 1 } }; @@ -226,7 +226,7 @@ @"Setting lineColor to a constant value should update line-color."); XCTAssertEqualObjects(layer.lineColor, styleValue, @"lineColor should round-trip constant values."); - + styleValue = [MGLStyleValue<MGLColor *> valueWithStops:@{ @18: styleValue, }]; @@ -239,20 +239,20 @@ @"Setting lineColor to a function should update line-color."); XCTAssertEqualObjects(layer.lineColor, styleValue, @"lineColor should round-trip functions."); - + layer.lineColor = nil; XCTAssertTrue(rawLayer->getLineColor().isUndefined(), @"Unsetting lineColor should return line-color to the default value."); XCTAssertEqualObjects(layer.lineColor, defaultStyleValue, @"lineColor should return the default value after being unset."); } - + // line-dasharray { XCTAssertTrue(rawLayer->getLineDasharray().isUndefined(), @"line-dasharray should be unset initially."); MGLStyleValue<NSArray<NSNumber *> *> *defaultStyleValue = layer.lineDashPattern; - + MGLStyleValue<NSArray<NSNumber *> *> *styleValue = [MGLStyleValue<NSArray<NSNumber *> *> valueWithRawValue:@[@1, @2]]; layer.lineDashPattern = styleValue; mbgl::style::PropertyValue<std::vector<float>> propertyValue = { {1, 2} }; @@ -260,7 +260,7 @@ @"Setting lineDashPattern to a constant value should update line-dasharray."); XCTAssertEqualObjects(layer.lineDashPattern, styleValue, @"lineDashPattern should round-trip constant values."); - + styleValue = [MGLStyleValue<NSArray<NSNumber *> *> valueWithStops:@{ @18: styleValue, }]; @@ -273,20 +273,20 @@ @"Setting lineDashPattern to a function should update line-dasharray."); XCTAssertEqualObjects(layer.lineDashPattern, styleValue, @"lineDashPattern should round-trip functions."); - + layer.lineDashPattern = nil; XCTAssertTrue(rawLayer->getLineDasharray().isUndefined(), @"Unsetting lineDashPattern should return line-dasharray to the default value."); XCTAssertEqualObjects(layer.lineDashPattern, defaultStyleValue, @"lineDashPattern should return the default value after being unset."); } - + // line-gap-width { XCTAssertTrue(rawLayer->getLineGapWidth().isUndefined(), @"line-gap-width should be unset initially."); MGLStyleValue<NSNumber *> *defaultStyleValue = layer.lineGapWidth; - + MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff]; layer.lineGapWidth = styleValue; mbgl::style::PropertyValue<float> propertyValue = { 0xff }; @@ -294,7 +294,7 @@ @"Setting lineGapWidth to a constant value should update line-gap-width."); XCTAssertEqualObjects(layer.lineGapWidth, styleValue, @"lineGapWidth should round-trip constant values."); - + styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{ @18: styleValue, }]; @@ -307,20 +307,20 @@ @"Setting lineGapWidth to a function should update line-gap-width."); XCTAssertEqualObjects(layer.lineGapWidth, styleValue, @"lineGapWidth should round-trip functions."); - + layer.lineGapWidth = nil; XCTAssertTrue(rawLayer->getLineGapWidth().isUndefined(), @"Unsetting lineGapWidth should return line-gap-width to the default value."); XCTAssertEqualObjects(layer.lineGapWidth, defaultStyleValue, @"lineGapWidth should return the default value after being unset."); } - + // line-offset { XCTAssertTrue(rawLayer->getLineOffset().isUndefined(), @"line-offset should be unset initially."); MGLStyleValue<NSNumber *> *defaultStyleValue = layer.lineOffset; - + MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff]; layer.lineOffset = styleValue; mbgl::style::PropertyValue<float> propertyValue = { 0xff }; @@ -328,7 +328,7 @@ @"Setting lineOffset to a constant value should update line-offset."); XCTAssertEqualObjects(layer.lineOffset, styleValue, @"lineOffset should round-trip constant values."); - + styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{ @18: styleValue, }]; @@ -341,20 +341,20 @@ @"Setting lineOffset to a function should update line-offset."); XCTAssertEqualObjects(layer.lineOffset, styleValue, @"lineOffset should round-trip functions."); - + layer.lineOffset = nil; XCTAssertTrue(rawLayer->getLineOffset().isUndefined(), @"Unsetting lineOffset should return line-offset to the default value."); XCTAssertEqualObjects(layer.lineOffset, defaultStyleValue, @"lineOffset should return the default value after being unset."); } - + // line-opacity { XCTAssertTrue(rawLayer->getLineOpacity().isUndefined(), @"line-opacity should be unset initially."); MGLStyleValue<NSNumber *> *defaultStyleValue = layer.lineOpacity; - + MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff]; layer.lineOpacity = styleValue; mbgl::style::PropertyValue<float> propertyValue = { 0xff }; @@ -362,7 +362,7 @@ @"Setting lineOpacity to a constant value should update line-opacity."); XCTAssertEqualObjects(layer.lineOpacity, styleValue, @"lineOpacity should round-trip constant values."); - + styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{ @18: styleValue, }]; @@ -375,20 +375,20 @@ @"Setting lineOpacity to a function should update line-opacity."); XCTAssertEqualObjects(layer.lineOpacity, styleValue, @"lineOpacity should round-trip functions."); - + layer.lineOpacity = nil; XCTAssertTrue(rawLayer->getLineOpacity().isUndefined(), @"Unsetting lineOpacity should return line-opacity to the default value."); XCTAssertEqualObjects(layer.lineOpacity, defaultStyleValue, @"lineOpacity should return the default value after being unset."); } - + // line-pattern { XCTAssertTrue(rawLayer->getLinePattern().isUndefined(), @"line-pattern should be unset initially."); MGLStyleValue<NSString *> *defaultStyleValue = layer.linePattern; - + MGLStyleValue<NSString *> *styleValue = [MGLStyleValue<NSString *> valueWithRawValue:@"Line Pattern"]; layer.linePattern = styleValue; mbgl::style::PropertyValue<std::string> propertyValue = { "Line Pattern" }; @@ -396,7 +396,7 @@ @"Setting linePattern to a constant value should update line-pattern."); XCTAssertEqualObjects(layer.linePattern, styleValue, @"linePattern should round-trip constant values."); - + styleValue = [MGLStyleValue<NSString *> valueWithStops:@{ @18: styleValue, }]; @@ -409,20 +409,20 @@ @"Setting linePattern to a function should update line-pattern."); XCTAssertEqualObjects(layer.linePattern, styleValue, @"linePattern should round-trip functions."); - + layer.linePattern = nil; XCTAssertTrue(rawLayer->getLinePattern().isUndefined(), @"Unsetting linePattern should return line-pattern to the default value."); XCTAssertEqualObjects(layer.linePattern, defaultStyleValue, @"linePattern should return the default value after being unset."); } - + // line-translate { XCTAssertTrue(rawLayer->getLineTranslate().isUndefined(), @"line-translate should be unset initially."); MGLStyleValue<NSValue *> *defaultStyleValue = layer.lineTranslation; - + MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue: #if TARGET_OS_IPHONE [NSValue valueWithCGVector:CGVectorMake(1, 1)] @@ -436,7 +436,7 @@ @"Setting lineTranslation to a constant value should update line-translate."); XCTAssertEqualObjects(layer.lineTranslation, styleValue, @"lineTranslation should round-trip constant values."); - + styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{ @18: styleValue, }]; @@ -449,20 +449,20 @@ @"Setting lineTranslation to a function should update line-translate."); XCTAssertEqualObjects(layer.lineTranslation, styleValue, @"lineTranslation should round-trip functions."); - + layer.lineTranslation = nil; XCTAssertTrue(rawLayer->getLineTranslate().isUndefined(), @"Unsetting lineTranslation should return line-translate to the default value."); XCTAssertEqualObjects(layer.lineTranslation, defaultStyleValue, @"lineTranslation should return the default value after being unset."); } - + // line-translate-anchor { XCTAssertTrue(rawLayer->getLineTranslateAnchor().isUndefined(), @"line-translate-anchor should be unset initially."); MGLStyleValue<NSValue *> *defaultStyleValue = layer.lineTranslationAnchor; - + MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLLineTranslationAnchor:MGLLineTranslationAnchorViewport]]; layer.lineTranslationAnchor = styleValue; mbgl::style::PropertyValue<mbgl::style::TranslateAnchorType> propertyValue = { mbgl::style::TranslateAnchorType::Viewport }; @@ -470,7 +470,7 @@ @"Setting lineTranslationAnchor to a constant value should update line-translate-anchor."); XCTAssertEqualObjects(layer.lineTranslationAnchor, styleValue, @"lineTranslationAnchor should round-trip constant values."); - + styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{ @18: styleValue, }]; @@ -483,20 +483,20 @@ @"Setting lineTranslationAnchor to a function should update line-translate-anchor."); XCTAssertEqualObjects(layer.lineTranslationAnchor, styleValue, @"lineTranslationAnchor should round-trip functions."); - + layer.lineTranslationAnchor = nil; XCTAssertTrue(rawLayer->getLineTranslateAnchor().isUndefined(), @"Unsetting lineTranslationAnchor should return line-translate-anchor to the default value."); XCTAssertEqualObjects(layer.lineTranslationAnchor, defaultStyleValue, @"lineTranslationAnchor should return the default value after being unset."); } - + // line-width { XCTAssertTrue(rawLayer->getLineWidth().isUndefined(), @"line-width should be unset initially."); MGLStyleValue<NSNumber *> *defaultStyleValue = layer.lineWidth; - + MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff]; layer.lineWidth = styleValue; mbgl::style::PropertyValue<float> propertyValue = { 0xff }; @@ -504,7 +504,7 @@ @"Setting lineWidth to a constant value should update line-width."); XCTAssertEqualObjects(layer.lineWidth, styleValue, @"lineWidth should round-trip constant values."); - + styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{ @18: styleValue, }]; @@ -517,7 +517,7 @@ @"Setting lineWidth to a function should update line-width."); XCTAssertEqualObjects(layer.lineWidth, styleValue, @"lineWidth should round-trip functions."); - + layer.lineWidth = nil; XCTAssertTrue(rawLayer->getLineWidth().isUndefined(), @"Unsetting lineWidth should return line-width to the default value."); |