Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Add test for removeAnnotation
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Sep 28, 2015
1 parent af392b9 commit 0156ac7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/api/annotations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0156ac7

Please sign in to comment.