summaryrefslogtreecommitdiff
path: root/vcl/qa
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-10-23 22:03:11 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-11-27 09:55:11 +0100
commiteda5af2d45c61daeed3d1b83bf50136263865689 (patch)
tree8e3554260a3545810d83d461c43ebaa7befb99ff /vcl/qa
parente3d0b69c7f26ca8df261c67476355290387f5c68 (diff)
backendtest: Add polyline bezier curve backend tests
Change-Id: I8cb3e97de79cbd683a266b09fb7d194c07b0089f
Diffstat (limited to 'vcl/qa')
-rw-r--r--vcl/qa/cppunit/BackendTest.cxx27
1 files changed, 27 insertions, 0 deletions
diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx
index 70eeabb1d6b5..9836972539b8 100644
--- a/vcl/qa/cppunit/BackendTest.cxx
+++ b/vcl/qa/cppunit/BackendTest.cxx
@@ -370,6 +370,30 @@ public:
#endif
}
+ void testDrawBezierWithPolylineB2D()
+ {
+ vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
+ Bitmap aBitmap = aOutDevTest.setupBezier();
+ auto eResult = vcl::test::OutputDeviceTestCommon::checkBezier(aBitmap);
+ exportImage("06-01_bezier_test-polyline_b2d.png", aBitmap);
+ (void)eResult;
+#ifndef SKIP_TEST_ASSERTS
+ CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
+#endif
+ }
+
+ void testDrawBezierAAWithPolylineB2D()
+ {
+ vcl::test::OutputDeviceTestPolyLineB2D aOutDevTest;
+ Bitmap aBitmap = aOutDevTest.setupAABezier();
+ auto eResult = vcl::test::OutputDeviceTestCommon::checkBezier(aBitmap);
+ exportImage("07-01_bezier_AA_test-polyline_b2d.png", aBitmap);
+ (void)eResult;
+#ifndef SKIP_TEST_ASSERTS
+ CPPUNIT_ASSERT(eResult != vcl::test::TestResult::Failed);
+#endif
+ }
+
#undef SKIP_TEST_ASSERTS
CPPUNIT_TEST_SUITE(BackendTest);
@@ -405,6 +429,9 @@ public:
CPPUNIT_TEST(testDrawInvertN50WithRectangle);
CPPUNIT_TEST(testDrawInvertTrackFrameWithRectangle);
+ CPPUNIT_TEST(testDrawBezierWithPolylineB2D);
+ CPPUNIT_TEST(testDrawBezierAAWithPolylineB2D);
+
CPPUNIT_TEST_SUITE_END();
};