From 97288cae96dd88c48b7e7f13ffe6fcf6bae5942d Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Thu, 17 Nov 2016 11:51:33 +0100 Subject: [PATCH] [test] Check all zoom levels in Annotations.SymbolAnnotation --- test/api/annotations.test.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/test/api/annotations.test.cpp b/test/api/annotations.test.cpp index ef70ee188..458ac3f13 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) {