diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-08-19 22:54:30 +0200 |
---|---|---|
committer | Dane Springmeyer <springmeyer@users.noreply.github.com> | 2019-08-19 13:54:30 -0700 |
commit | 71a334152ad0332f93ed4cc0d7af89e2eb689496 (patch) | |
tree | 609d918b9c53547de66b9fdeadc0d4e5539ad52e /test | |
parent | f4e187bde4caa54980389eaadba92d4957ee0213 (diff) | |
download | qtlocation-mapboxgl-71a334152ad0332f93ed4cc0d7af89e2eb689496.tar.gz |
[core] also remove version info in ImageManager when removing an image (#15397)
Diffstat (limited to 'test')
-rw-r--r-- | test/renderer/image_manager.test.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/renderer/image_manager.test.cpp b/test/renderer/image_manager.test.cpp index 0b72578c35..16700d713f 100644 --- a/test/renderer/image_manager.test.cpp +++ b/test/renderer/image_manager.test.cpp @@ -50,6 +50,18 @@ TEST(ImageManager, AddRemove) { EXPECT_EQ(nullptr, imageManager.getImage("four")); } +TEST(ImageManager, Update) { + FixtureLog log; + ImageManager imageManager; + + imageManager.addImage(makeMutable<style::Image::Impl>("one", PremultipliedImage({ 16, 16 }), 2)); + EXPECT_EQ(0, imageManager.updatedImageVersions.size()); + imageManager.updateImage(makeMutable<style::Image::Impl>("one", PremultipliedImage({ 16, 16 }), 2)); + EXPECT_EQ(1, imageManager.updatedImageVersions.size()); + imageManager.removeImage("one"); + EXPECT_EQ(0, imageManager.updatedImageVersions.size()); +} + TEST(ImageManager, RemoveReleasesBinPackRect) { FixtureLog log; ImageManager imageManager; |