summaryrefslogtreecommitdiff
path: root/test/api/query.test.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-04-25 12:56:59 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-02 08:45:09 -0700
commitc2b00378b78b55d50968a9b11ed75bb4edf62ec9 (patch)
tree12a164d821dcdeb84d8a88dc231b3f2f9bef8ffd /test/api/query.test.cpp
parenta2350320988bd881e261f92930b2d3359ff2071e (diff)
downloadqtlocation-mapboxgl-c2b00378b78b55d50968a9b11ed75bb4edf62ec9.tar.gz
[all] Push querySourceFeatures back out to Map
Once Source and RendererSource are split, Source will no longer have access to tiles.
Diffstat (limited to 'test/api/query.test.cpp')
-rw-r--r--test/api/query.test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/api/query.test.cpp b/test/api/query.test.cpp
index 77dc095484..c509753d2d 100644
--- a/test/api/query.test.cpp
+++ b/test/api/query.test.cpp
@@ -86,7 +86,7 @@ TEST(Query, QueryRenderedFeaturesFilter) {
TEST(Query, QuerySourceFeatures) {
QueryTest test;
- auto features1 = test.map.getSource("source3")->querySourceFeatures();
+ auto features1 = test.map.querySourceFeatures("source3");
EXPECT_EQ(features1.size(), 1u);
}
@@ -94,15 +94,15 @@ TEST(Query, QuerySourceFeaturesOptionValidation) {
QueryTest test;
// GeoJSONSource, doesn't require a layer id
- auto features = test.map.getSource("source3")->querySourceFeatures();
+ auto features = test.map.querySourceFeatures("source3");
ASSERT_EQ(features.size(), 1u);
// VectorSource, requires a layer id
- features = test.map.getSource("source5")->querySourceFeatures();
+ features = test.map.querySourceFeatures("source5");
ASSERT_EQ(features.size(), 0u);
// RasterSource, not supported
- features = test.map.getSource("source6")->querySourceFeatures();
+ features = test.map.querySourceFeatures("source6");
ASSERT_EQ(features.size(), 0u);
}
@@ -110,15 +110,15 @@ TEST(Query, QuerySourceFeaturesFilter) {
QueryTest test;
const EqualsFilter eqFilter = { "key1", std::string("value1") };
- auto features1 = test.map.getSource("source4")->querySourceFeatures({{}, { eqFilter }});
+ auto features1 = test.map.querySourceFeatures("source4", {{}, { eqFilter }});
EXPECT_EQ(features1.size(), 1u);
const IdentifierNotEqualsFilter idNotEqFilter = { std::string("feature1") };
- auto features2 = test.map.getSource("source4")->querySourceFeatures({{}, { idNotEqFilter }});
+ auto features2 = test.map.querySourceFeatures("source4", {{}, { idNotEqFilter }});
EXPECT_EQ(features2.size(), 0u);
const GreaterThanFilter gtFilter = { "key2", 1.0 };
- auto features3 = test.map.getSource("source4")->querySourceFeatures({{}, { gtFilter }});
+ auto features3 = test.map.querySourceFeatures("source4", {{}, { gtFilter }});
EXPECT_EQ(features3.size(), 1u);
}