From 45394fcf7e45f623add7ed3c6dc43e6d6f89158c Mon Sep 17 00:00:00 2001 From: cutamar Date: Sun, 28 Aug 2022 02:42:21 +0200 Subject: tdf#141908 Replace usage of sal_Int32 with Color in unit tests Change-Id: Ifb5ff2e6d5ed28bcb9e190d7f2deaaa970693cbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138938 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- vcl/qa/cppunit/drawmode.cxx | 8 ++------ vcl/qa/cppunit/outdev.cxx | 4 +--- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'vcl/qa/cppunit') diff --git a/vcl/qa/cppunit/drawmode.cxx b/vcl/qa/cppunit/drawmode.cxx index f2b59dc8440c..e3792ae1f29f 100644 --- a/vcl/qa/cppunit/drawmode.cxx +++ b/vcl/qa/cppunit/drawmode.cxx @@ -343,9 +343,7 @@ void VclDrawModeTest::testDrawModeBitmapEx() Bitmap::ScopedReadAccess pReadAccess(aResultBitmap); const BitmapColor& rColor = pReadAccess->GetColor(0, 0); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x26), sal_Int32(rColor.GetRed())); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x26), sal_Int32(rColor.GetGreen())); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x26), sal_Int32(rColor.GetBlue())); + CPPUNIT_ASSERT_EQUAL(BitmapColor(0x26, 0x26, 0x26), rColor); } // any other operation other than DrawModeFlags::GrayBitmap is a noop @@ -355,9 +353,7 @@ void VclDrawModeTest::testDrawModeBitmapEx() Bitmap::ScopedReadAccess pReadAccess(aResultBitmap); const BitmapColor& rColor = pReadAccess->GetColor(0, 0); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x80), sal_Int32(rColor.GetRed())); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00), sal_Int32(rColor.GetGreen())); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00), sal_Int32(rColor.GetBlue())); + CPPUNIT_ASSERT_EQUAL(BitmapColor(COL_RED), rColor); } } diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx index 79fe71431f87..b3468aa7c4ee 100644 --- a/vcl/qa/cppunit/outdev.cxx +++ b/vcl/qa/cppunit/outdev.cxx @@ -452,9 +452,7 @@ void VclOutdevTest::testDrawGrayBitmap() { Bitmap::ScopedReadAccess pReadAccess(aVDevBmp); const BitmapColor& rColor = pReadAccess->GetColor(0, 0); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x26), sal_Int32(rColor.GetRed())); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x26), sal_Int32(rColor.GetGreen())); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0x26), sal_Int32(rColor.GetBlue())); + CPPUNIT_ASSERT_EQUAL(BitmapColor(0x26, 0x26, 0x26), rColor); } } -- cgit