diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-11-17 11:51:33 +0100 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-11-18 09:13:53 +0100 |
commit | 97288cae96dd88c48b7e7f13ffe6fcf6bae5942d (patch) | |
tree | 1e68952889ad5c6f9520128069fb3eee2c25e66c /test | |
parent | e9f849e4d08ac085ae7fbf336c5714e8140fdbdf (diff) | |
download | qtlocation-mapboxgl-97288cae96dd88c48b7e7f13ffe6fcf6bae5942d.tar.gz |
[test] Check all zoom levels in Annotations.SymbolAnnotation
Diffstat (limited to 'test')
-rw-r--r-- | test/api/annotations.test.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/test/api/annotations.test.cpp b/test/api/annotations.test.cpp index ef70ee188c..458ac3f13e 100644 --- a/test/api/annotations.test.cpp +++ b/test/api/annotations.test.cpp @@ -47,14 +47,11 @@ TEST(Annotations, SymbolAnnotation) { auto size = test.view.size; auto screenBox = ScreenBox { {}, { double(size.width), double(size.height) } }; - auto features = test.map.queryPointAnnotations(screenBox); - EXPECT_EQ(features.size(), 1u); - - test.map.setZoom(test.map.getMaxZoom()); - test.checkRendering("point_annotation"); - - features = test.map.queryPointAnnotations(screenBox); - EXPECT_EQ(features.size(), 1u); + for (uint8_t zoom = test.map.getMinZoom(); zoom <= test.map.getMaxZoom(); ++zoom) { + test.map.setZoom(zoom); + test.checkRendering("point_annotation"); + EXPECT_EQ(test.map.queryPointAnnotations(screenBox).size(), 1u); + } } TEST(Annotations, LineAnnotation) { |