summaryrefslogtreecommitdiff
path: root/test
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
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')
-rw-r--r--test/api/query.test.cpp14
-rw-r--r--test/tile/vector_tile.test.cpp2
2 files changed, 8 insertions, 8 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);
}
diff --git a/test/tile/vector_tile.test.cpp b/test/tile/vector_tile.test.cpp
index 26c5dac8c0..15d437c361 100644
--- a/test/tile/vector_tile.test.cpp
+++ b/test/tile/vector_tile.test.cpp
@@ -6,8 +6,8 @@
#include <mbgl/util/default_thread_pool.hpp>
#include <mbgl/util/run_loop.hpp>
#include <mbgl/map/transform.hpp>
+#include <mbgl/map/query.hpp>
#include <mbgl/style/style.hpp>
-#include <mbgl/style/query.hpp>
#include <mbgl/style/update_parameters.hpp>
#include <mbgl/style/layers/symbol_layer.hpp>
#include <mbgl/renderer/symbol_bucket.hpp>