diff options
author | Fabian Guerra <fabian.guerra@mapbox.com> | 2018-04-20 16:57:27 -0400 |
---|---|---|
committer | Fabian Guerra <fabian.guerra@mapbox.com> | 2018-04-20 16:57:27 -0400 |
commit | 1e4da7229c17b14cc48c135e71563d5e753679ee (patch) | |
tree | 94dfb49ca721fe8cc199801d68cc9df8b1c03810 | |
parent | bb56e49491df9af54d9617e1e639612bdef53604 (diff) | |
download | qtlocation-mapboxgl-1e4da7229c17b14cc48c135e71563d5e753679ee.tar.gz |
[ios, macos] Remove featureProperties variable tests.
-rw-r--r-- | platform/darwin/src/NSExpression+MGLAdditions.mm | 5 | ||||
-rw-r--r-- | platform/darwin/test/MGLExpressionTests.mm | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/platform/darwin/src/NSExpression+MGLAdditions.mm b/platform/darwin/src/NSExpression+MGLAdditions.mm index f0edd6e05b..c82a7dc008 100644 --- a/platform/darwin/src/NSExpression+MGLAdditions.mm +++ b/platform/darwin/src/NSExpression+MGLAdditions.mm @@ -661,7 +661,7 @@ NS_DICTIONARY_OF(NSNumber *, NSExpression *) *MGLStopDictionaryByReplacingTokens } + (NSExpression *)featurePropertiesVariableExpression { - return [NSExpression expressionForVariable:@"featureProperties"]; + return [self featureAttributesVariableExpression]; } + (instancetype)mgl_expressionForConditional:(nonnull NSPredicate *)conditionPredicate trueExpression:(nonnull NSExpression *)trueExpression falseExpresssion:(nonnull NSExpression *)falseExpression { @@ -1004,8 +1004,7 @@ NSArray *MGLSubexpressionsWithJSONObjects(NSArray *objects) { if ([self.variable isEqualToString:@"featureIdentifier"]) { return @[@"id"]; } - if ([self.variable isEqualToString:@"featureProperties"] || - [self.variable isEqualToString:@"featureAttributes"]) { + if ([self.variable isEqualToString:@"featureAttributes"]) { return @[@"properties"]; } return @[@"var", self.variable]; diff --git a/platform/darwin/test/MGLExpressionTests.mm b/platform/darwin/test/MGLExpressionTests.mm index 320b98696b..d54e961b00 100644 --- a/platform/darwin/test/MGLExpressionTests.mm +++ b/platform/darwin/test/MGLExpressionTests.mm @@ -189,10 +189,6 @@ using namespace std::string_literals; XCTAssertEqualObjects([NSExpression expressionWithMGLJSONObject:@[@"properties"]], expression); } { - NSExpression *expression = [NSExpression expressionForVariable:@"featureProperties"]; - XCTAssertEqualObjects(expression.mgl_jsonExpressionObject, @[@"properties"]); - } - { NSExpression *expression = [NSExpression expressionForVariable:@"loremIpsum"]; NSArray *jsonExpression = @[@"var", @"loremIpsum"]; XCTAssertEqualObjects(expression.mgl_jsonExpressionObject, jsonExpression); |