diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-09-28 14:14:45 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-09-28 14:14:45 -0700 |
commit | 0156ac7c8ce7d22b8a68cc37fcb03b1271ef7a4e (patch) | |
tree | b9eb55bccea005650afb538a83a05074ed10c541 /test/api | |
parent | af392b9434fd176704e564dfc22ee74f3a50cdf6 (diff) | |
download | qtlocation-mapboxgl-0156ac7c8ce7d22b8a68cc37fcb03b1271ef7a4e.tar.gz |
Add test for removeAnnotation
Diffstat (limited to 'test/api')
-rw-r--r-- | test/api/annotations.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/api/annotations.cpp b/test/api/annotations.cpp index a00a449a6d..84cf259b03 100644 --- a/test/api/annotations.cpp +++ b/test/api/annotations.cpp @@ -120,6 +120,22 @@ TEST(Annotations, NonImmediateAdd) { util::write_file("test/output/non_immediate_add.png", renderPNG(map)); } +TEST(Annotations, Remove) { + auto display = std::make_shared<mbgl::HeadlessDisplay>(); + HeadlessView view(display, 1); + DefaultFileSource fileSource(nullptr); + + Map map(view, fileSource, MapMode::Still); + map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), ""); + uint32_t point = map.addPointAnnotation(PointAnnotation({ 0, 0 }, "default_marker")); + + renderPNG(map); + + map.removeAnnotation(point); + + util::write_file("test/output/remove.png", renderPNG(map)); +} + TEST(Annotations, SwitchStyle) { auto display = std::make_shared<mbgl::HeadlessDisplay>(); HeadlessView view(display, 1); |