diff options
author | Anand Thakker <anandthakker@users.noreply.github.com> | 2017-02-17 16:16:25 -0500 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-02-17 13:16:25 -0800 |
commit | 062b18374d580f3522f577c4dccbfcd15e260e80 (patch) | |
tree | 357406a6090d755b33b46534e44b9f47fb040360 /platform/darwin/test/MGLStyleLayerTests.mm.ejs | |
parent | d4c569a0187d98bca6b71671fa5daf6ee09747da (diff) | |
download | qtlocation-mapboxgl-062b18374d580f3522f577c4dccbfcd15e260e80.tar.gz |
[core] Enable property functions for text-{field,transform} (#7944)
Diffstat (limited to 'platform/darwin/test/MGLStyleLayerTests.mm.ejs')
-rw-r--r-- | platform/darwin/test/MGLStyleLayerTests.mm.ejs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/platform/darwin/test/MGLStyleLayerTests.mm.ejs b/platform/darwin/test/MGLStyleLayerTests.mm.ejs index bc5a3cdde0..810d7fbd3b 100644 --- a/platform/darwin/test/MGLStyleLayerTests.mm.ejs +++ b/platform/darwin/test/MGLStyleLayerTests.mm.ejs @@ -84,7 +84,7 @@ XCTAssertEqualObjects(layer.<%- objCName(property) %>, functionStyleValue, @"<%- objCName(property) %> should round-trip camera functions."); -<% if (property["property-function"]) { -%> +<% if (property["property-function"] && isInterpolatable(property)) { -%> functionStyleValue = [MGLStyleValue<<%- propertyType(property) %>> valueWithInterpolationMode:MGLInterpolationModeExponential sourceStops:@{@18: constantStyleValue} attributeName:@"keyName" options:nil]; layer.<%- objCName(property) %> = functionStyleValue; @@ -117,13 +117,12 @@ XCTAssertEqualObjects(layer.<%- objCName(property) %>, defaultStyleValue, @"<%- objCName(property) %> should return the default value after being unset."); <% } -%> -<% if (property["function"] == "piecewise-constant") { -%> +<% if (!property["property-function"]) { -%> functionStyleValue = [MGLStyleValue<<%- propertyType(property) %>> valueWithInterpolationMode:MGLInterpolationModeIdentity sourceStops:nil attributeName:@"" options:nil]; XCTAssertThrowsSpecificNamed(layer.<%- objCName(property) %> = functionStyleValue, NSException, NSInvalidArgumentException, @"MGLStyleValue should raise an exception if it is applied to a property that cannot support it"); - functionStyleValue = [MGLStyleValue<<%- propertyType(property) %>> valueWithInterpolationMode:MGLInterpolationModeInterval compositeStops:@{@18: constantStyleValue} attributeName:@"" options:nil]; - XCTAssertThrowsSpecificNamed(layer.<%- objCName(property) %> = functionStyleValue, NSException, NSInvalidArgumentException, @"MGLStyleValue should raise an exception if it is applied to a property that cannot support it"); + XCTAssertThrowsSpecificNamed(layer.<%- objCName(property) %> = functionStyleValue, NSException, NSInvalidArgumentException, @"MGLStyleValue should raise an exception if it is applied to a property that cannot support it"); <% } -%> } <% } -%> |