diff options
author | danswick <dan.swick@gmail.com> | 2019-09-18 11:39:43 -0700 |
---|---|---|
committer | danswick <dan.swick@gmail.com> | 2019-09-18 11:39:43 -0700 |
commit | 46914ecff8b3f2a1945b33358a879c2aac074f17 (patch) | |
tree | 697cf276a43ae4c18c0ad7029c00e7d771448822 /test/api/query.test.cpp | |
parent | 47ea84ad1a5fed3431d026c5765c17c507d4623e (diff) | |
parent | 8805defe57aa0d8886c7828d39b1b9b1f17f21b8 (diff) | |
download | qtlocation-mapboxgl-upstream/android-docs-automation.tar.gz |
Merge branch 'master' into android-docs-automationupstream/android-docs-automation
Diffstat (limited to 'test/api/query.test.cpp')
-rw-r--r-- | test/api/query.test.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/api/query.test.cpp b/test/api/query.test.cpp index bf3f64a0c8..83aeec81ec 100644 --- a/test/api/query.test.cpp +++ b/test/api/query.test.cpp @@ -126,6 +126,22 @@ TEST(Query, QuerySourceFeatures) { EXPECT_EQ(features1.size(), 1u); } +TEST(Query, QuerySourceFeatureStates) { + QueryTest test; + + FeatureState newState; + newState["hover"] = true; + newState["radius"].set<uint64_t>(20); + test.frontend.getRenderer()->setFeatureState("source1", {}, "feature1", newState); + + FeatureState states; + test.frontend.getRenderer()->getFeatureState(states, "source1", {}, "feature1"); + ASSERT_EQ(states.size(), 2u); + ASSERT_EQ(states["hover"], true); + ASSERT_EQ(states["radius"].get<uint64_t>(), 20u); + ASSERT_EQ(newState, states); +} + TEST(Query, QuerySourceFeaturesOptionValidation) { QueryTest test; |