summaryrefslogtreecommitdiff
path: root/test/map/map.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/map/map.test.cpp')
-rw-r--r--test/map/map.test.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp
index 2b7c3c2e3d..be78c8714b 100644
--- a/test/map/map.test.cpp
+++ b/test/map/map.test.cpp
@@ -445,14 +445,14 @@ TEST(Map, AddImage) {
Map map(test.backend, test.view.getSize(), 1, test.fileSource, test.threadPool, MapMode::Still);
auto decoded1 = decodeImage(util::read_file("test/fixtures/sprites/default_marker.png"));
auto decoded2 = decodeImage(util::read_file("test/fixtures/sprites/default_marker.png"));
- auto image1 = std::make_unique<style::Image>(std::move(decoded1), 1.0);
- auto image2 = std::make_unique<style::Image>(std::move(decoded2), 1.0);
+ auto image1 = std::make_unique<style::Image>("test-icon", std::move(decoded1), 1.0);
+ auto image2 = std::make_unique<style::Image>("test-icon", std::move(decoded2), 1.0);
// No-op.
- map.addImage("test-icon", std::move(image1));
+ map.addImage(std::move(image1));
map.setStyleJSON(util::read_file("test/fixtures/api/icon_style.json"));
- map.addImage("test-icon", std::move(image2));
+ map.addImage(std::move(image2));
test::checkImage("test/fixtures/map/add_icon", test::render(map, test.view));
}
@@ -461,10 +461,10 @@ TEST(Map, RemoveImage) {
Map map(test.backend, test.view.getSize(), 1, test.fileSource, test.threadPool, MapMode::Still);
auto decoded = decodeImage(util::read_file("test/fixtures/sprites/default_marker.png"));
- auto image = std::make_unique<style::Image>(std::move(decoded), 1.0);
+ auto image = std::make_unique<style::Image>("test-icon", std::move(decoded), 1.0);
map.setStyleJSON(util::read_file("test/fixtures/api/icon_style.json"));
- map.addImage("test-icon", std::move(image));
+ map.addImage(std::move(image));
map.removeImage("test-icon");
test::checkImage("test/fixtures/map/remove_icon", test::render(map, test.view));
}
@@ -474,10 +474,10 @@ TEST(Map, GetImage) {
Map map(test.backend, test.view.getSize(), 1, test.fileSource, test.threadPool, MapMode::Still);
auto decoded = decodeImage(util::read_file("test/fixtures/sprites/default_marker.png"));
- auto image = std::make_unique<style::Image>(std::move(decoded), 1.0);
+ auto image = std::make_unique<style::Image>("test-icon", std::move(decoded), 1.0);
map.setStyleJSON(util::read_file("test/fixtures/api/icon_style.json"));
- map.addImage("test-icon", std::move(image));
+ map.addImage(std::move(image));
test::checkImage("test/fixtures/map/get_icon", map.getImage("test-icon")->getImage());
}