summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-27 18:37:16 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2016-06-28 12:02:43 +0300
commit33a8856c2af9c587e35b97658f9a7aed85a7cf60 (patch)
tree234a60fbf6969de584d8017cb55c1e5353a1cb2a /test
parent1d46e83e3087f0d392c74c40d6b562359ed91576 (diff)
downloadqtlocation-mapboxgl-33a8856c2af9c587e35b97658f9a7aed85a7cf60.tar.gz
[test] Added max zoom annotation tests
Diffstat (limited to 'test')
-rw-r--r--test/api/annotations.cpp10
-rw-r--r--test/fixtures/annotations/fill_annotation_max_zoom/expected.pngbin0 -> 1569 bytes
-rw-r--r--test/fixtures/annotations/line_annotation_max_zoom/expected.pngbin0 -> 2893 bytes
3 files changed, 10 insertions, 0 deletions
diff --git a/test/api/annotations.cpp b/test/api/annotations.cpp
index 5b588a9e5c..05d1f28fc7 100644
--- a/test/api/annotations.cpp
+++ b/test/api/annotations.cpp
@@ -42,6 +42,10 @@ TEST(Annotations, SymbolAnnotation) {
test.map.addAnnotationIcon("default_marker", namedMarker("default_marker.png"));
test.map.addAnnotation(SymbolAnnotation { Point<double>(0, 0), "default_marker" });
test.checkRendering("point_annotation");
+
+ // FIXME: https://github.com/mapbox/mapbox-gl-native/issues/5419
+ //test.map.setZoom(test.map.getMaxZoom());
+ //test.checkRendering("point_annotation");
}
TEST(Annotations, LineAnnotation) {
@@ -55,6 +59,9 @@ TEST(Annotations, LineAnnotation) {
test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test.map.addAnnotation(annotation);
test.checkRendering("line_annotation");
+
+ test.map.setZoom(test.map.getMaxZoom());
+ test.checkRendering("line_annotation_max_zoom");
}
TEST(Annotations, FillAnnotation) {
@@ -67,6 +74,9 @@ TEST(Annotations, FillAnnotation) {
test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test.map.addAnnotation(annotation);
test.checkRendering("fill_annotation");
+
+ test.map.setZoom(test.map.getMaxZoom());
+ test.checkRendering("fill_annotation_max_zoom");
}
TEST(Annotations, StyleSourcedShapeAnnotation) {
diff --git a/test/fixtures/annotations/fill_annotation_max_zoom/expected.png b/test/fixtures/annotations/fill_annotation_max_zoom/expected.png
new file mode 100644
index 0000000000..4e77e671cd
--- /dev/null
+++ b/test/fixtures/annotations/fill_annotation_max_zoom/expected.png
Binary files differ
diff --git a/test/fixtures/annotations/line_annotation_max_zoom/expected.png b/test/fixtures/annotations/line_annotation_max_zoom/expected.png
new file mode 100644
index 0000000000..8512d8c06a
--- /dev/null
+++ b/test/fixtures/annotations/line_annotation_max_zoom/expected.png
Binary files differ