diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-15 14:09:06 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-16 12:26:35 -0700 |
commit | cc1ea759a681cadcfd06fd7bdda79ca6deb38c62 (patch) | |
tree | 97ece422b0516b11979c84b8136f95aeabb1aa91 /test/map | |
parent | c0f6e5ccefc67dbdaa6ab7c7ea75a2a2d0c3f2ae (diff) | |
download | qtlocation-mapboxgl-cc1ea759a681cadcfd06fd7bdda79ca6deb38c62.tar.gz |
[core, node, darwin, android, qt] Make image ID part of Image
More like Source and Layer.
Diffstat (limited to 'test/map')
-rw-r--r-- | test/map/map.test.cpp | 16 |
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()); } |