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/MGLFillStyleLayerTests.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/MGLFillStyleLayerTests.mm')
-rw-r--r-- | platform/darwin/test/MGLFillStyleLayerTests.mm | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/platform/darwin/test/MGLFillStyleLayerTests.mm b/platform/darwin/test/MGLFillStyleLayerTests.mm index fb50512afd..afc3260a28 100644 --- a/platform/darwin/test/MGLFillStyleLayerTests.mm +++ b/platform/darwin/test/MGLFillStyleLayerTests.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]; MGLFillStyleLayer *layer = [[MGLFillStyleLayer 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]; - + MGLFillStyleLayer *layer = [[MGLFillStyleLayer alloc] initWithIdentifier:@"layerID" source:source]; XCTAssertNotEqual(layer.rawLayer, nullptr); XCTAssertTrue(layer.rawLayer->is<mbgl::style::FillLayer>()); auto rawLayer = layer.rawLayer->as<mbgl::style::FillLayer>(); - + // fill-antialias { XCTAssertTrue(rawLayer->getFillAntialias().isUndefined(), @"fill-antialias should be unset initially."); MGLStyleValue<NSNumber *> *defaultStyleValue = layer.fillAntialiased; - + MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@NO]; layer.fillAntialiased = styleValue; mbgl::style::PropertyValue<bool> propertyValue = { false }; @@ -56,7 +56,7 @@ @"Setting fillAntialiased to a constant value should update fill-antialias."); XCTAssertEqualObjects(layer.fillAntialiased, styleValue, @"fillAntialiased should round-trip constant values."); - + styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{ @18: styleValue, }]; @@ -69,20 +69,20 @@ @"Setting fillAntialiased to a function should update fill-antialias."); XCTAssertEqualObjects(layer.fillAntialiased, styleValue, @"fillAntialiased should round-trip functions."); - + layer.fillAntialiased = nil; XCTAssertTrue(rawLayer->getFillAntialias().isUndefined(), @"Unsetting fillAntialiased should return fill-antialias to the default value."); XCTAssertEqualObjects(layer.fillAntialiased, defaultStyleValue, @"fillAntialiased should return the default value after being unset."); } - + // fill-color { XCTAssertTrue(rawLayer->getFillColor().isUndefined(), @"fill-color should be unset initially."); MGLStyleValue<MGLColor *> *defaultStyleValue = layer.fillColor; - + MGLStyleValue<MGLColor *> *styleValue = [MGLStyleValue<MGLColor *> valueWithRawValue:[MGLColor redColor]]; layer.fillColor = styleValue; mbgl::style::PropertyValue<mbgl::Color> propertyValue = { { 1, 0, 0, 1 } }; @@ -90,7 +90,7 @@ @"Setting fillColor to a constant value should update fill-color."); XCTAssertEqualObjects(layer.fillColor, styleValue, @"fillColor should round-trip constant values."); - + styleValue = [MGLStyleValue<MGLColor *> valueWithStops:@{ @18: styleValue, }]; @@ -103,20 +103,20 @@ @"Setting fillColor to a function should update fill-color."); XCTAssertEqualObjects(layer.fillColor, styleValue, @"fillColor should round-trip functions."); - + layer.fillColor = nil; XCTAssertTrue(rawLayer->getFillColor().isUndefined(), @"Unsetting fillColor should return fill-color to the default value."); XCTAssertEqualObjects(layer.fillColor, defaultStyleValue, @"fillColor should return the default value after being unset."); } - + // fill-opacity { XCTAssertTrue(rawLayer->getFillOpacity().isUndefined(), @"fill-opacity should be unset initially."); MGLStyleValue<NSNumber *> *defaultStyleValue = layer.fillOpacity; - + MGLStyleValue<NSNumber *> *styleValue = [MGLStyleValue<NSNumber *> valueWithRawValue:@0xff]; layer.fillOpacity = styleValue; mbgl::style::PropertyValue<float> propertyValue = { 0xff }; @@ -124,7 +124,7 @@ @"Setting fillOpacity to a constant value should update fill-opacity."); XCTAssertEqualObjects(layer.fillOpacity, styleValue, @"fillOpacity should round-trip constant values."); - + styleValue = [MGLStyleValue<NSNumber *> valueWithStops:@{ @18: styleValue, }]; @@ -137,20 +137,20 @@ @"Setting fillOpacity to a function should update fill-opacity."); XCTAssertEqualObjects(layer.fillOpacity, styleValue, @"fillOpacity should round-trip functions."); - + layer.fillOpacity = nil; XCTAssertTrue(rawLayer->getFillOpacity().isUndefined(), @"Unsetting fillOpacity should return fill-opacity to the default value."); XCTAssertEqualObjects(layer.fillOpacity, defaultStyleValue, @"fillOpacity should return the default value after being unset."); } - + // fill-outline-color { XCTAssertTrue(rawLayer->getFillOutlineColor().isUndefined(), @"fill-outline-color should be unset initially."); MGLStyleValue<MGLColor *> *defaultStyleValue = layer.fillOutlineColor; - + MGLStyleValue<MGLColor *> *styleValue = [MGLStyleValue<MGLColor *> valueWithRawValue:[MGLColor redColor]]; layer.fillOutlineColor = styleValue; mbgl::style::PropertyValue<mbgl::Color> propertyValue = { { 1, 0, 0, 1 } }; @@ -158,7 +158,7 @@ @"Setting fillOutlineColor to a constant value should update fill-outline-color."); XCTAssertEqualObjects(layer.fillOutlineColor, styleValue, @"fillOutlineColor should round-trip constant values."); - + styleValue = [MGLStyleValue<MGLColor *> valueWithStops:@{ @18: styleValue, }]; @@ -171,20 +171,20 @@ @"Setting fillOutlineColor to a function should update fill-outline-color."); XCTAssertEqualObjects(layer.fillOutlineColor, styleValue, @"fillOutlineColor should round-trip functions."); - + layer.fillOutlineColor = nil; XCTAssertTrue(rawLayer->getFillOutlineColor().isUndefined(), @"Unsetting fillOutlineColor should return fill-outline-color to the default value."); XCTAssertEqualObjects(layer.fillOutlineColor, defaultStyleValue, @"fillOutlineColor should return the default value after being unset."); } - + // fill-pattern { XCTAssertTrue(rawLayer->getFillPattern().isUndefined(), @"fill-pattern should be unset initially."); MGLStyleValue<NSString *> *defaultStyleValue = layer.fillPattern; - + MGLStyleValue<NSString *> *styleValue = [MGLStyleValue<NSString *> valueWithRawValue:@"Fill Pattern"]; layer.fillPattern = styleValue; mbgl::style::PropertyValue<std::string> propertyValue = { "Fill Pattern" }; @@ -192,7 +192,7 @@ @"Setting fillPattern to a constant value should update fill-pattern."); XCTAssertEqualObjects(layer.fillPattern, styleValue, @"fillPattern should round-trip constant values."); - + styleValue = [MGLStyleValue<NSString *> valueWithStops:@{ @18: styleValue, }]; @@ -205,20 +205,20 @@ @"Setting fillPattern to a function should update fill-pattern."); XCTAssertEqualObjects(layer.fillPattern, styleValue, @"fillPattern should round-trip functions."); - + layer.fillPattern = nil; XCTAssertTrue(rawLayer->getFillPattern().isUndefined(), @"Unsetting fillPattern should return fill-pattern to the default value."); XCTAssertEqualObjects(layer.fillPattern, defaultStyleValue, @"fillPattern should return the default value after being unset."); } - + // fill-translate { XCTAssertTrue(rawLayer->getFillTranslate().isUndefined(), @"fill-translate should be unset initially."); MGLStyleValue<NSValue *> *defaultStyleValue = layer.fillTranslation; - + MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue: #if TARGET_OS_IPHONE [NSValue valueWithCGVector:CGVectorMake(1, 1)] @@ -232,7 +232,7 @@ @"Setting fillTranslation to a constant value should update fill-translate."); XCTAssertEqualObjects(layer.fillTranslation, styleValue, @"fillTranslation should round-trip constant values."); - + styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{ @18: styleValue, }]; @@ -245,20 +245,20 @@ @"Setting fillTranslation to a function should update fill-translate."); XCTAssertEqualObjects(layer.fillTranslation, styleValue, @"fillTranslation should round-trip functions."); - + layer.fillTranslation = nil; XCTAssertTrue(rawLayer->getFillTranslate().isUndefined(), @"Unsetting fillTranslation should return fill-translate to the default value."); XCTAssertEqualObjects(layer.fillTranslation, defaultStyleValue, @"fillTranslation should return the default value after being unset."); } - + // fill-translate-anchor { XCTAssertTrue(rawLayer->getFillTranslateAnchor().isUndefined(), @"fill-translate-anchor should be unset initially."); MGLStyleValue<NSValue *> *defaultStyleValue = layer.fillTranslationAnchor; - + MGLStyleValue<NSValue *> *styleValue = [MGLStyleValue<NSValue *> valueWithRawValue:[NSValue valueWithMGLFillTranslationAnchor:MGLFillTranslationAnchorViewport]]; layer.fillTranslationAnchor = styleValue; mbgl::style::PropertyValue<mbgl::style::TranslateAnchorType> propertyValue = { mbgl::style::TranslateAnchorType::Viewport }; @@ -266,7 +266,7 @@ @"Setting fillTranslationAnchor to a constant value should update fill-translate-anchor."); XCTAssertEqualObjects(layer.fillTranslationAnchor, styleValue, @"fillTranslationAnchor should round-trip constant values."); - + styleValue = [MGLStyleValue<NSValue *> valueWithStops:@{ @18: styleValue, }]; @@ -279,7 +279,7 @@ @"Setting fillTranslationAnchor to a function should update fill-translate-anchor."); XCTAssertEqualObjects(layer.fillTranslationAnchor, styleValue, @"fillTranslationAnchor should round-trip functions."); - + layer.fillTranslationAnchor = nil; XCTAssertTrue(rawLayer->getFillTranslateAnchor().isUndefined(), @"Unsetting fillTranslationAnchor should return fill-translate-anchor to the default value."); |