[Libreoffice-commits] core.git: vcl/qa

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Fri May 15 10:17:41 UTC 2020


 vcl/qa/cppunit/GraphicTest.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 88aeadd97e3aa8146e88912fa06d65743a36ead3
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu May 14 16:02:31 2020 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Fri May 15 12:17:01 2020 +0200

    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 at gmail.com>

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));


More information about the Libreoffice-commits mailing list