diff options
author | Fabian Guerra Soto <fabian.guerra@mapbox.com> | 2018-04-16 13:39:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-16 13:39:10 -0400 |
commit | fe4348eec34a3a9c23f7a0af2ccfa4eff28416ea (patch) | |
tree | 17ea2dfa4b30f0d32d7a917d6c0ec78e2db8d1c9 /platform/darwin/test | |
parent | 816406e038de02cbf654571a75a77ed51a53351c (diff) | |
download | qtlocation-mapboxgl-fe4348eec34a3a9c23f7a0af2ccfa4eff28416ea.tar.gz |
[ios, macos] Remove mgl_ prefix from built-in expressions variables. (#11689)
Diffstat (limited to 'platform/darwin/test')
-rw-r--r-- | platform/darwin/test/MGLExpressionTests.mm | 14 | ||||
-rw-r--r-- | platform/darwin/test/MGLPredicateTests.mm | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/platform/darwin/test/MGLExpressionTests.mm b/platform/darwin/test/MGLExpressionTests.mm index 37b1978788..b050c5f652 100644 --- a/platform/darwin/test/MGLExpressionTests.mm +++ b/platform/darwin/test/MGLExpressionTests.mm @@ -171,21 +171,21 @@ using namespace std::string_literals; XCTAssertEqualObjects([expression expressionValueWithObject:nil context:context], @1); } { - NSExpression *expression = [NSExpression expressionForVariable:@"mgl_geometryType"]; + NSExpression *expression = [NSExpression expressionForVariable:@"geometryType"]; XCTAssertEqualObjects(expression.mgl_jsonExpressionObject, @[@"geometry-type"]); - XCTAssertEqualObjects([NSExpression expressionWithFormat:@"$mgl_geometryType"].mgl_jsonExpressionObject, @[@"geometry-type"]); + XCTAssertEqualObjects([NSExpression expressionWithFormat:@"$geometryType"].mgl_jsonExpressionObject, @[@"geometry-type"]); XCTAssertEqualObjects([NSExpression expressionWithMGLJSONObject:@[@"geometry-type"]], expression); } { - NSExpression *expression = [NSExpression expressionForVariable:@"mgl_featureIdentifier"]; + NSExpression *expression = [NSExpression expressionForVariable:@"featureIdentifier"]; XCTAssertEqualObjects(expression.mgl_jsonExpressionObject, @[@"id"]); - XCTAssertEqualObjects([NSExpression expressionWithFormat:@"$mgl_featureIdentifier"].mgl_jsonExpressionObject, @[@"id"]); + XCTAssertEqualObjects([NSExpression expressionWithFormat:@"$featureIdentifier"].mgl_jsonExpressionObject, @[@"id"]); XCTAssertEqualObjects([NSExpression expressionWithMGLJSONObject:@[@"id"]], expression); } { - NSExpression *expression = [NSExpression expressionForVariable:@"mgl_featureProperties"]; + NSExpression *expression = [NSExpression expressionForVariable:@"featureProperties"]; XCTAssertEqualObjects(expression.mgl_jsonExpressionObject, @[@"properties"]); - XCTAssertEqualObjects([NSExpression expressionWithFormat:@"$mgl_featureProperties"].mgl_jsonExpressionObject, @[@"properties"]); + XCTAssertEqualObjects([NSExpression expressionWithFormat:@"$featureProperties"].mgl_jsonExpressionObject, @[@"properties"]); XCTAssertEqualObjects([NSExpression expressionWithMGLJSONObject:@[@"properties"]], expression); } { @@ -817,7 +817,7 @@ using namespace std::string_literals; } { NSExpression *expression = [NSExpression expressionForFunction:@"mgl_does:have:" - arguments:@[[NSExpression expressionForVariable:@"mgl_featureProperties"], + arguments:@[[NSExpression expressionForVariable:@"featureProperties"], [NSExpression expressionForConstantValue:@"x"]]]; NSArray *jsonExpression = @[@"has", @"x", @[@"properties"]]; XCTAssertEqualObjects(expression.mgl_jsonExpressionObject, jsonExpression); diff --git a/platform/darwin/test/MGLPredicateTests.mm b/platform/darwin/test/MGLPredicateTests.mm index 5671de3252..18918f1b8f 100644 --- a/platform/darwin/test/MGLPredicateTests.mm +++ b/platform/darwin/test/MGLPredicateTests.mm @@ -615,9 +615,9 @@ namespace mbgl { } { NSArray *expected = @[@"match", @[@"id"], @6, @YES, @5, @YES, @4, @YES, @3, @YES, @NO]; - NSPredicate *predicate = [NSPredicate predicateWithFormat:@"$mgl_featureIdentifier IN { 6, 5, 4, 3}"]; + NSPredicate *predicate = [NSPredicate predicateWithFormat:@"$featureIdentifier IN { 6, 5, 4, 3}"]; XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, expected); - NSPredicate *predicateAfter = [NSPredicate predicateWithFormat:@"MGL_MATCH($mgl_featureIdentifier, 6, YES, 5, YES, 4, YES, 3, YES, NO) == YES"]; + NSPredicate *predicateAfter = [NSPredicate predicateWithFormat:@"MGL_MATCH($featureIdentifier, 6, YES, 5, YES, 4, YES, 3, YES, NO) == YES"]; XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:expected], predicateAfter); } { @@ -636,9 +636,9 @@ namespace mbgl { } { NSArray *expected = @[@"match", @[@"id"], @6, @YES, @5, @YES, @4, @YES, @3, @YES, @NO]; - NSPredicate *predicate = [NSPredicate predicateWithFormat:@"{ 6, 5, 4, 3} CONTAINS $mgl_featureIdentifier"]; + NSPredicate *predicate = [NSPredicate predicateWithFormat:@"{ 6, 5, 4, 3} CONTAINS $featureIdentifier"]; XCTAssertEqualObjects(predicate.mgl_jsonExpressionObject, expected); - NSPredicate *predicateAfter = [NSPredicate predicateWithFormat:@"MGL_MATCH($mgl_featureIdentifier, 6, YES, 5, YES, 4, YES, 3, YES, NO) == YES"]; + NSPredicate *predicateAfter = [NSPredicate predicateWithFormat:@"MGL_MATCH($featureIdentifier, 6, YES, 5, YES, 4, YES, 3, YES, NO) == YES"]; XCTAssertEqualObjects([NSPredicate mgl_predicateWithJSONObject:expected], predicateAfter); } } |