summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLStyleLayerTests.mm.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/test/MGLStyleLayerTests.mm.ejs')
-rw-r--r--platform/darwin/test/MGLStyleLayerTests.mm.ejs10
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/darwin/test/MGLStyleLayerTests.mm.ejs b/platform/darwin/test/MGLStyleLayerTests.mm.ejs
index e17501ed18..7b725480ff 100644
--- a/platform/darwin/test/MGLStyleLayerTests.mm.ejs
+++ b/platform/darwin/test/MGLStyleLayerTests.mm.ejs
@@ -69,7 +69,7 @@
NSExpression *constantExpression = [NSExpression expressionWithFormat:<%- objCTestValue(property, type, true, 3) %>];
layer.<%- objCName(property) %> = constantExpression;
-<% if (property["property-function"]) { -%>
+<% if (isDataDriven(property)) { -%>
mbgl::style::DataDrivenPropertyValue<<%- mbglType(property) %>> propertyValue = { <%- mbglTestValue(property, type) %> };
<% } else { -%>
mbgl::style::PropertyValue<<%- mbglType(property) %>> propertyValue = { <%- mbglTestValue(property, type) %> };
@@ -88,13 +88,13 @@
{ 18, <%- mbglTestValue(property, type) %> },
}};
propertyValue = mbgl::style::CameraFunction<<%- mbglType(property) %>> { intervalStops };
-
+
XCTAssertEqual(rawLayer->get<%- camelize(originalPropertyName(property)) %>(), propertyValue,
@"Setting <%- objCName(property) %> to a camera expression should update <%- originalPropertyName(property) %>.");
XCTAssertEqualObjects(layer.<%- objCName(property) %>, functionExpression,
@"<%- objCName(property) %> should round-trip camera expressions.");
-<% if (property["property-function"] && isInterpolatable(property)) { -%>
+<% if (isDataDriven(property) && isInterpolatable(property)) { -%>
functionExpression = [NSExpression expressionWithFormat:@"FUNCTION(keyName, 'mgl_interpolateWithCurveType:parameters:stops:', 'linear', nil, %@)", @{@18: constantExpression}];
layer.<%- objCName(property) %> = functionExpression;
@@ -118,7 +118,7 @@
@"Setting <%- objCName(property) %> to a camera-data expression should update <%- originalPropertyName(property) %>.");
XCTAssertEqualObjects(layer.<%- objCName(property) %>, functionExpression,
@"<%- objCName(property) %> should round-trip camera-data expressions.");
-<% } -%>
+<% } -%>
<% if (!property.required) { -%>
layer.<%- objCName(property) %> = nil;
@@ -127,7 +127,7 @@
XCTAssertEqualObjects(layer.<%- objCName(property) %>, defaultExpression,
@"<%- objCName(property) %> should return the default value after being unset.");
<% } -%>
-<% if (!property["property-function"]) { -%>
+<% if (!isDataDriven(property)) { -%>
functionExpression = [NSExpression expressionForKeyPath:@"bogus"];
XCTAssertThrowsSpecificNamed(layer.<%- objCName(property) %> = functionExpression, NSException, NSInvalidArgumentException, @"MGL<%- camelize(type) %>Layer should raise an exception if a camera-data expression is applied to a property that does not support key paths to feature attributes.");