summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-05-14 16:02:31 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-05-15 12:17:01 +0200
commit88aeadd97e3aa8146e88912fa06d65743a36ead3 (patch)
tree74c0274bfbda5a4c2b190bcebc76f8987c37b0a5
parentc895a6d8298a349784cd0aafff4bf518ac8d0a7d (diff)
do not hardcode a BitmapChecksum in a test
The checksum depends on this like RGB vs BGR and changing the VCL backend to e.g. Skia breaks this. Change-Id: I5bb3f4c009327c92683bfa575bd1510e3a1ea826 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94224 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
-rw-r--r--vcl/qa/cppunit/GraphicTest.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index f40b5c1b88e7..6a70ba921942 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -306,7 +306,8 @@ void GraphicTest::testSwapping()
CPPUNIT_ASSERT_EQUAL(120L, aGraphic.GetSizePixel().Width());
CPPUNIT_ASSERT_EQUAL(100L, aGraphic.GetSizePixel().Height());
- CPPUNIT_ASSERT_EQUAL(BitmapChecksum(0xF5331397837B58EB), aGraphic.GetChecksum());
+
+ BitmapChecksum aChecksumBeforeSwapping = aGraphic.GetChecksum();
CPPUNIT_ASSERT_EQUAL(sal_uInt32(319), aGraphic.GetGfxLink().GetDataSize());
@@ -347,7 +348,7 @@ void GraphicTest::testSwapping()
CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
CPPUNIT_ASSERT_EQUAL(false, aGraphic.ImplGetImpGraphic()->isSwappedOut());
- CPPUNIT_ASSERT_EQUAL(BitmapChecksum(0xF5331397837B58EB), aGraphic.GetChecksum());
+ CPPUNIT_ASSERT_EQUAL(aChecksumBeforeSwapping, aGraphic.GetChecksum());
// File shouldn't be available anymore
CPPUNIT_ASSERT_EQUAL(false, comphelper::DirectoryHelper::fileExists(rSwapFileURL));