[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/qa

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 19 08:36:38 UTC 2020


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

New commits:
commit b5ee39024198f4a820b5680152757c83bdb8f3bf
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: Wed Aug 19 10:35:28 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>
    (cherry picked from commit 88aeadd97e3aa8146e88912fa06d65743a36ead3)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100882
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx
index 583d7ce2ae3d..1630a599f7fd 100644
--- a/vcl/qa/cppunit/GraphicTest.cxx
+++ b/vcl/qa/cppunit/GraphicTest.cxx
@@ -289,7 +289,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());
 
@@ -330,7 +331,7 @@ void GraphicTest::testSwapping()
     CPPUNIT_ASSERT_EQUAL(true, aGraphic.isAvailable());
     CPPUNIT_ASSERT_EQUAL(false, aGraphic.ImplGetImpGraphic()->ImplIsSwapOut());
 
-    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