From 436e3ce430e83ba93a6e79f24788b302dc2a9839 Mon Sep 17 00:00:00 2001 From: jmkiley Date: Fri, 12 Oct 2018 11:14:41 -0700 Subject: [ios, macos] fixed a test, documented length is unavailable --- platform/darwin/test/MGLExpressionTests.mm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'platform/darwin/test/MGLExpressionTests.mm') 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"] -- cgit v1.2.1