summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-12-20 12:41:40 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-12-20 12:41:40 -0800
commita6b1773a44d4ef086eb30967cb041cb64312650a (patch)
treeec293e38c9ec3ef1f32195f0d5071f73b88497ed /test
parentdad57df38ef86363da9bff2e62f3fddc5688f0cf (diff)
parente2fde9cc4eff3de5ab2f513d0c24ad5471d147e6 (diff)
downloadqtlocation-mapboxgl-a6b1773a44d4ef086eb30967cb041cb64312650a.tar.gz
Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.5-master
Also reran make style-code and manually discarded anything related to fill extrusion layers.
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/map/get_icon/expected.pngbin0 -> 1010 bytes
-rw-r--r--test/map/map.test.cpp12
2 files changed, 12 insertions, 0 deletions
diff --git a/test/fixtures/map/get_icon/expected.png b/test/fixtures/map/get_icon/expected.png
new file mode 100644
index 0000000000..b112096c18
--- /dev/null
+++ b/test/fixtures/map/get_icon/expected.png
Binary files differ
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp
index 0df7c7c2aa..8eedeb3c01 100644
--- a/test/map/map.test.cpp
+++ b/test/map/map.test.cpp
@@ -396,6 +396,18 @@ TEST(Map, RemoveImage) {
test::checkImage("test/fixtures/map/remove_icon", test::render(map, test.view));
}
+TEST(Map, GetImage) {
+ MapTest test;
+
+ Map map(test.backend, test.view.size, 1, test.fileSource, test.threadPool, MapMode::Still);
+ auto decoded = decodeImage(util::read_file("test/fixtures/sprites/default_marker.png"));
+ auto image = std::make_unique<SpriteImage>(std::move(decoded), 1.0);
+
+ map.setStyleJSON(util::read_file("test/fixtures/api/icon_style.json"));
+ map.addImage("test-icon", std::move(image));
+ test::checkImage("test/fixtures/map/get_icon", map.getImage("test-icon")->image);
+}
+
TEST(Map, DontLoadUnneededTiles) {
MapTest test;