summaryrefslogtreecommitdiff
path: root/platform/darwin/test/MGLExpressionTests.mm
diff options
context:
space:
mode:
authorjmkiley <jordan.kiley@mapbox.com>2018-10-12 11:14:41 -0700
committerjmkiley <jordan.kiley@mapbox.com>2018-10-12 11:14:41 -0700
commit436e3ce430e83ba93a6e79f24788b302dc2a9839 (patch)
tree9c8bc0179155e8ecc7818fa9e6d937bf844d1983 /platform/darwin/test/MGLExpressionTests.mm
parent72eba4d8614acd09d2408a983f8d99313ff9b995 (diff)
downloadqtlocation-mapboxgl-436e3ce430e83ba93a6e79f24788b302dc2a9839.tar.gz
[ios, macos] fixed a test, documented length is unavailable
Diffstat (limited to 'platform/darwin/test/MGLExpressionTests.mm')
-rw-r--r--platform/darwin/test/MGLExpressionTests.mm12
1 files changed, 6 insertions, 6 deletions
diff --git a/platform/darwin/test/MGLExpressionTests.mm b/platform/darwin/test/MGLExpressionTests.mm
index 39f08eda00..7e091a7f05 100644
--- a/platform/darwin/test/MGLExpressionTests.mm
+++ b/platform/darwin/test/MGLExpressionTests.mm
@@ -620,11 +620,12 @@ using namespace std::string_literals;
XCTAssertEqualObjects([NSExpression expressionWithMGLJSONObject:jsonExpression], expression);
}
{
- // TODO JK: caught "NSInternalInconsistencyException", "length: is not a supported method."
- NSExpression *expression = [NSExpression expressionForFunction:@"length:" arguments:arguments];
- NSArray *jsonExpression = @[@"length", @"MacDonald"];
- XCTAssertEqualObjects(expression.mgl_jsonExpressionObject, jsonExpression);
- XCTAssertEqualObjects([NSExpression expressionWithMGLJSONObject:jsonExpression], expression);
+ if (@available(iOS 9.0, *)) {
+ NSExpression *expression = [NSExpression expressionForFunction:@"length:" arguments:arguments];
+ NSArray *jsonExpression = @[@"length", @"MacDonald"];
+ XCTAssertEqualObjects(expression.mgl_jsonExpressionObject, jsonExpression);
+ XCTAssertEqualObjects([NSExpression expressionWithMGLJSONObject:jsonExpression], expression);
+ }
}
}
@@ -1099,7 +1100,6 @@ using namespace std::string_literals;
@80000
],
@[@"get", @"abbr"],
- // TODO JK - ((localizedExpression.mgl_jsonExpressionObject) equal to (localizedJSONExpression)) failed: throwing "*** -constantValue only defined for abstract class. Define -[NSKeyPathExpression constantValue]!"
@[@"get", @"name"]
],
@5, @[@"get", @"name"]