vcl/qa/cppunit/BackendTest.cxx | 15 +++++++++------ vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx | 11 +++++++---- vcl/qa/cppunit/outdev.cxx | 6 +++--- 3 files changed, 19 insertions(+), 13 deletions(-)
New commits: commit 06d918dcc47ae3f1c511cbdccfeacc8adb123f28 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Mar 2 13:39:00 2021 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed Mar 3 08:47:56 2021 +0100 loplugin:unreffun (macOS) ...after 0c36f364b14aacd0eeb53087ae2fce54402dc741 "tdf#138122 Detect window scaling for multi display configurations on macOS" Change-Id: I89daad37f5911c18c5424ab3d0e0f484ebc3bb58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111829 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx index 018541aa40ab..734d255272c2 100644 --- a/vcl/qa/cppunit/BackendTest.cxx +++ b/vcl/qa/cppunit/BackendTest.cxx @@ -708,6 +708,8 @@ public: // Test SalGraphics::blendBitmap() and blendAlphaBitmap() calls. void testDrawBlendExtended() { +// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented +#ifndef MACOSX // Create virtual device with alpha. ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT, DeviceFormat::DEFAULT); @@ -753,10 +755,13 @@ public: exportDevice("/tmp/blend_extended_04.png", device); CPPUNIT_ASSERT_EQUAL(COL_BLUE, device->GetPixel(Point(2, 2))); CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(6, 6))); +#endif } void testDrawAlphaBitmapMirrored() { +// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented +#ifndef MACOSX // Normal virtual device. ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT); // Virtual device with alpha. @@ -811,10 +816,13 @@ public: CPPUNIT_ASSERT_EQUAL(COL_RED, alphaDevice->GetPixel(Point(2, 2))); CPPUNIT_ASSERT_EQUAL(COL_BLUE, alphaDevice->GetPixel(Point(3, 2))); alphaDevice->Erase(); +#endif } void testTdf124848() { +// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented +#ifndef MACOSX ScopedVclPtr<VirtualDevice> device = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT); device->SetOutputSizePixel(Size(100, 100)); device->SetBackground(Wallpaper(COL_WHITE)); @@ -843,6 +851,7 @@ public: CPPUNIT_ASSERT_EQUAL(COL_BLACK, device->GetPixel(Point(50, 20))); CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(49, 20))); CPPUNIT_ASSERT_EQUAL(COL_WHITE, device->GetPixel(Point(51, 20))); +#endif } void testTdf136171() @@ -934,16 +943,10 @@ public: CPPUNIT_TEST(testRadialGradient); CPPUNIT_TEST(testRadialGradientOfs); -// TODO: Following unit tests are not executed for macOS unless bitmap scaling is implemented -#ifndef MACOSX CPPUNIT_TEST(testDrawBlendExtended); CPPUNIT_TEST(testDrawAlphaBitmapMirrored); -#endif -// TODO: Following unit test is not executed for macOS unless bitmap scaling is implemented -#ifndef MACOSX CPPUNIT_TEST(testTdf124848); -#endif CPPUNIT_TEST(testTdf136171); CPPUNIT_TEST_SUITE_END(); diff --git a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx index 127c0201bd78..cdb8e4c39fd7 100644 --- a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx +++ b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx @@ -50,11 +50,8 @@ public: CPPUNIT_TEST(testTdf104141); CPPUNIT_TEST(testTdf113918); -// TODO: Following unit tests are not executed for macOS unless bitmap scaling is implemented -#ifndef MACOSX CPPUNIT_TEST(testDrawAlphaBitmapEx); CPPUNIT_TEST(testAlphaVirtualDevice); -#endif CPPUNIT_TEST(testTdf116888); CPPUNIT_TEST_SUITE_END(); @@ -110,7 +107,7 @@ void BitmapRenderTest::testTdf113918() CPPUNIT_ASSERT(aColor.GetGreen() > 100); } -#if defined(_WIN32) || defined(MACOSX) || defined(IOS) +#if defined(_WIN32) || defined(IOS) namespace { @@ -128,6 +125,8 @@ int deltaColor(BitmapColor aColor1, BitmapColor aColor2) void BitmapRenderTest::testDrawAlphaBitmapEx() { +// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented +#ifndef MACOSX ScopedVclPtrInstance<VirtualDevice> pVDev; pVDev->SetOutputSizePixel(Size(8, 8)); pVDev->SetBackground(Wallpaper(COL_WHITE)); @@ -175,10 +174,13 @@ void BitmapRenderTest::testDrawAlphaBitmapEx() #else CPPUNIT_ASSERT_EQUAL(Color(0x7F, 0xFF, 0x7F), pVDev->GetPixel(Point(2, 2))); #endif +#endif } void BitmapRenderTest::testAlphaVirtualDevice() { +// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented +#ifndef MACOSX // Create an alpha virtual device ScopedVclPtr<VirtualDevice> pAlphaVirtualDevice(VclPtr<VirtualDevice>::Create( *Application::GetDefaultDevice(), DeviceFormat::DEFAULT, DeviceFormat::DEFAULT)); @@ -240,6 +242,7 @@ void BitmapRenderTest::testAlphaVirtualDevice() #else CPPUNIT_ASSERT_EQUAL(Color(ColorTransparency, 0x4422FF55), aColor); #endif +#endif } void BitmapRenderTest::testTdf116888() diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx index 9a7ef2c064e8..58a283749fa1 100644 --- a/vcl/qa/cppunit/outdev.cxx +++ b/vcl/qa/cppunit/outdev.cxx @@ -42,10 +42,7 @@ public: CPPUNIT_TEST_SUITE(VclOutdevTest); -// TODO: Following unit tests are not executed for macOS unless bitmap scaling is implemented -#ifndef MACOSX CPPUNIT_TEST(testVirtualDevice); -#endif CPPUNIT_TEST(testUseAfterDispose); CPPUNIT_TEST(testPrinterBackgroundColor); CPPUNIT_TEST(testWindowBackgroundColor); @@ -87,6 +84,8 @@ void VclOutdevTest::testWindowBackgroundColor() void VclOutdevTest::testVirtualDevice() { +// TODO: This unit test is not executed for macOS unless bitmap scaling is implemented +#ifndef MACOSX ScopedVclPtrInstance<VirtualDevice> pVDev; pVDev->SetOutputSizePixel(Size(32, 32)); pVDev->SetBackground(Wallpaper(COL_WHITE)); @@ -135,6 +134,7 @@ void VclOutdevTest::testVirtualDevice() CPPUNIT_ASSERT( pWin ); OutputDevice *pOutDev = pWin.get(); #endif +#endif } void VclOutdevTest::testUseAfterDispose() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits