[Libreoffice-commits] core.git: Branch 'feature/skia' - vcl/qa
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 24 20:25:03 UTC 2019
vcl/qa/cppunit/BackendTest.cxx | 45 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
New commits:
commit 71d6b3fba9d8333e90d366460626526fcc6379d0
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Thu Oct 24 22:22:11 2019 +0200
Commit: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
CommitDate: Thu Oct 24 22:23:51 2019 +0200
backendtests: add some bitmap tests
Change-Id: If791dd113fb484ccdd81a2ee7c1f217057a918ca
diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx
index f3ba4195d5c3..cfa41e0dc790 100644
--- a/vcl/qa/cppunit/BackendTest.cxx
+++ b/vcl/qa/cppunit/BackendTest.cxx
@@ -337,6 +337,46 @@ public:
CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
}
+ void testDrawBitmap()
+ {
+ vcl::test::OutputDeviceTestBitmap aOutDevTest;
+ Bitmap aBitmap = aOutDevTest.setupDrawBitmap();
+ exportImage("08-01_bitmap_test.png", aBitmap);
+ auto eResult = vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap(aBitmap);
+ if (aOutDevTest.getRenderBackendName() == "skia")
+ CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
+ }
+
+ void testDrawTransformedBitmap()
+ {
+ vcl::test::OutputDeviceTestBitmap aOutDevTest;
+ Bitmap aBitmap = aOutDevTest.setupDrawTransformedBitmap();
+ auto eResult = vcl::test::OutputDeviceTestBitmap::checkTransformedBitmap(aBitmap);
+ exportImage("08-02_transformed_bitmap_test.png", aBitmap);
+ if (aOutDevTest.getRenderBackendName() == "skia")
+ CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
+ }
+
+ void testDrawBitmapExWithAlpha()
+ {
+ vcl::test::OutputDeviceTestBitmap aOutDevTest;
+ Bitmap aBitmap = aOutDevTest.setupDrawBitmapExWithAlpha();
+ auto eResult = vcl::test::OutputDeviceTestBitmap::checkBitmapExWithAlpha(aBitmap);
+ exportImage("08-03_bitmapex_with_alpha_test.png", aBitmap);
+ if (aOutDevTest.getRenderBackendName() == "skia")
+ CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
+ }
+
+ void testDrawMask()
+ {
+ vcl::test::OutputDeviceTestBitmap aOutDevTest;
+ Bitmap aBitmap = aOutDevTest.setupDrawMask();
+ auto eResult = vcl::test::OutputDeviceTestBitmap::checkMask(aBitmap);
+ exportImage("08-04_mask_test.png", aBitmap);
+ if (aOutDevTest.getRenderBackendName() == "skia")
+ CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
+ }
+
CPPUNIT_TEST_SUITE(BackendTest);
CPPUNIT_TEST(testDrawRectWithRectangle);
CPPUNIT_TEST(testDrawRectWithPixel);
@@ -373,6 +413,11 @@ public:
CPPUNIT_TEST(testDrawBezierWithPolylineB2D);
CPPUNIT_TEST(testDrawBezierAAWithPolylineB2D);
+ CPPUNIT_TEST(testDrawBitmap);
+ CPPUNIT_TEST(testDrawTransformedBitmap);
+ CPPUNIT_TEST(testDrawBitmapExWithAlpha);
+ CPPUNIT_TEST(testDrawMask);
+
CPPUNIT_TEST_SUITE_END();
};
More information about the Libreoffice-commits
mailing list