[Libreoffice-commits] core.git: vcl/qa
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 17 14:53:27 UTC 2021
vcl/qa/cppunit/BmpFilterTest.cxx | 44 +++++++++++++++++++--------------------
1 file changed, 22 insertions(+), 22 deletions(-)
New commits:
commit d7ed130f537a81b900c55d222004cc9e88c0b355
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Mar 17 14:34:26 2021 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Mar 17 15:52:33 2021 +0100
Fix CPPUNIT_ASSERT_EQUAL argument type mismatch (Windows, 64-bit)
long vs. tools::Long aka sal_Int64 aka __int64 aka long long
Change-Id: Iabf0b18dba12985250b63664c464fba53ae552b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112641
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/vcl/qa/cppunit/BmpFilterTest.cxx b/vcl/qa/cppunit/BmpFilterTest.cxx
index e1341353c299..1b38e6c3193f 100644
--- a/vcl/qa/cppunit/BmpFilterTest.cxx
+++ b/vcl/qa/cppunit/BmpFilterTest.cxx
@@ -34,8 +34,8 @@ CPPUNIT_TEST_FIXTURE(BmpFilterTest, testBMP_RGB_888)
Graphic aGraphic;
CPPUNIT_ASSERT(BmpReader(aFileStream, aGraphic));
auto aBitmap = aGraphic.GetBitmapEx();
- CPPUNIT_ASSERT_EQUAL(10L, aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(10L, aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(10), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(10), aBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT_EQUAL(COL_WHITE, aBitmap.GetPixelColor(0, 0));
CPPUNIT_ASSERT_EQUAL(COL_WHITE, aBitmap.GetPixelColor(9, 9));
CPPUNIT_ASSERT_EQUAL(Color(0x72, 0xd1, 0xc8), aBitmap.GetPixelColor(1, 1));
@@ -48,8 +48,8 @@ CPPUNIT_TEST_FIXTURE(BmpFilterTest, testBMP_RGB_565)
Graphic aGraphic;
CPPUNIT_ASSERT(BmpReader(aFileStream, aGraphic));
auto aBitmap = aGraphic.GetBitmapEx();
- CPPUNIT_ASSERT_EQUAL(10L, aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(10L, aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(10), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(10), aBitmap.GetSizePixel().Height());
// White is not completely white
//CPPUNIT_ASSERT_EQUAL(Color(0xf8, 0xfc, 0xf8), aBitmap.GetPixelColor(0, 0));
@@ -65,8 +65,8 @@ CPPUNIT_TEST_FIXTURE(BmpFilterTest, testBMP_32_ARGB_8888)
Graphic aGraphic;
CPPUNIT_ASSERT(BmpReader(aFileStream, aGraphic));
auto aBitmap = aGraphic.GetBitmapEx();
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
//CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, aBitmap.GetPixelColor(0, 0));
//CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, aBitmap.GetPixelColor(2, 0));
@@ -80,8 +80,8 @@ CPPUNIT_TEST_FIXTURE(BmpFilterTest, testBMP_Paint_24_RGB_888)
Graphic aGraphic;
CPPUNIT_ASSERT(BmpReader(aFileStream, aGraphic));
auto aBitmap = aGraphic.GetBitmapEx();
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, aBitmap.GetPixelColor(0, 0));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, aBitmap.GetPixelColor(2, 0));
@@ -95,8 +95,8 @@ CPPUNIT_TEST_FIXTURE(BmpFilterTest, testBMP_Index_1BPP)
Graphic aGraphic;
CPPUNIT_ASSERT(BmpReader(aFileStream, aGraphic));
auto aBitmap = aGraphic.GetBitmapEx();
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT_EQUAL(COL_BLACK, aBitmap.GetPixelColor(0, 0));
CPPUNIT_ASSERT_EQUAL(COL_BLACK, aBitmap.GetPixelColor(0, 2));
@@ -110,8 +110,8 @@ CPPUNIT_TEST_FIXTURE(BmpFilterTest, testBMP_Index_4BPP)
Graphic aGraphic;
CPPUNIT_ASSERT(BmpReader(aFileStream, aGraphic));
auto aBitmap = aGraphic.GetBitmapEx();
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, aBitmap.GetPixelColor(0, 0));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, aBitmap.GetPixelColor(2, 0));
@@ -125,8 +125,8 @@ CPPUNIT_TEST_FIXTURE(BmpFilterTest, testBMP_Index_8BPP)
Graphic aGraphic;
CPPUNIT_ASSERT(BmpReader(aFileStream, aGraphic));
auto aBitmap = aGraphic.GetBitmapEx();
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, aBitmap.GetPixelColor(0, 0));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, aBitmap.GetPixelColor(2, 0));
@@ -140,8 +140,8 @@ CPPUNIT_TEST_FIXTURE(BmpFilterTest, testBMP_Index_8BPP_RLE)
Graphic aGraphic;
CPPUNIT_ASSERT(BmpReader(aFileStream, aGraphic));
auto aBitmap = aGraphic.GetBitmapEx();
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, aBitmap.GetPixelColor(0, 0));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, aBitmap.GetPixelColor(2, 0));
@@ -155,8 +155,8 @@ CPPUNIT_TEST_FIXTURE(BmpFilterTest, testBMP_V4)
Graphic aGraphic;
CPPUNIT_ASSERT(BmpReader(aFileStream, aGraphic));
auto aBitmap = aGraphic.GetBitmapEx();
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, aBitmap.GetPixelColor(0, 0));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, aBitmap.GetPixelColor(2, 0));
@@ -170,8 +170,8 @@ CPPUNIT_TEST_FIXTURE(BmpFilterTest, testBMP_V3)
Graphic aGraphic;
CPPUNIT_ASSERT(BmpReader(aFileStream, aGraphic));
auto aBitmap = aGraphic.GetBitmapEx();
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, aBitmap.GetPixelColor(0, 0));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, aBitmap.GetPixelColor(2, 0));
@@ -185,8 +185,8 @@ CPPUNIT_TEST_FIXTURE(BmpFilterTest, testBMP_V2)
Graphic aGraphic;
CPPUNIT_ASSERT(BmpReader(aFileStream, aGraphic));
auto aBitmap = aGraphic.GetBitmapEx();
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Width());
- CPPUNIT_ASSERT_EQUAL(4L, aBitmap.GetSizePixel().Height());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Width());
+ CPPUNIT_ASSERT_EQUAL(tools::Long(4), aBitmap.GetSizePixel().Height());
CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, aBitmap.GetPixelColor(0, 0));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, aBitmap.GetPixelColor(2, 0));
More information about the Libreoffice-commits
mailing list