summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLExpressionTests.mm
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/test/MGLExpressionTests.mm')
-rw-r--r--platform/darwin/test/MGLExpressionTests.mm5
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/darwin/test/MGLExpressionTests.mm b/platform/darwin/test/MGLExpressionTests.mm
index 97b3548db4..35f97326c6 100644
--- a/platform/darwin/test/MGLExpressionTests.mm
+++ b/platform/darwin/test/MGLExpressionTests.mm
@@ -568,7 +568,8 @@ using namespace std::string_literals;
// NSExpression is unable to evaluate NSNumber’s -floatValue,
// -doubleValue, or -decimalValue by themselves because they each return
// a primitive instead of an object.
- XCTAssertEqualObjects([NSExpression mgl_expressionWithJSONObject:jsonExpression], expression);
+ XCTAssertEqualObjects([NSExpression mgl_expressionWithJSONObject:jsonExpression],
+ [NSExpression expressionWithFormat:@"CAST(postalCode, 'NSNumber')"]);
}
{
NSExpression *expression = [NSExpression expressionWithFormat:@"FUNCTION(postalCode, 'mgl_numberWithFallbackValues:', zipCode)"];
@@ -638,7 +639,7 @@ using namespace std::string_literals;
}
{
NSDictionary *stops = @{@0: MGLConstantExpression(@111), @1: MGLConstantExpression(@1111)};
- NSExpression *expression = [NSExpression expressionWithFormat:@"FUNCTION($zoomLevel, 'mgl_stepWithMinimum:stops:', 11, %@)", stops];
+ NSExpression *expression = [NSExpression expressionWithFormat:@"mgl_step:from:stops:($zoomLevel, 11, %@)", stops];
NSArray *jsonExpression = @[@"step", @[@"zoom"], @11, @0, @111, @1, @1111];
XCTAssertEqualObjects(expression.mgl_jsonExpressionObject, jsonExpression);
XCTAssertEqualObjects([NSExpression mgl_expressionWithJSONObject:jsonExpression], expression);