vcl/qa/cppunit/outdev.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
New commits: commit ef4ad5f871c6ca4cfd84504752d17ed2969ff90d Author: Chris Sherlock <[email protected]> AuthorDate: Fri Oct 1 13:33:09 2021 +1000 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Mon Oct 11 11:58:08 2021 +0200 vcl: test OutputDevice::DrawWaveLine() Change-Id: I31391416b1633635ce7be7b4a445008d3e5ebde6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122972 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <[email protected]> diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx index 0d4d6187742e..41c4e3df8c7a 100644 --- a/vcl/qa/cppunit/outdev.cxx +++ b/vcl/qa/cppunit/outdev.cxx @@ -80,6 +80,7 @@ public: void testDrawChord(); void testDrawCheckered(); void testDrawBorder(); + void testDrawWaveLine(); CPPUNIT_TEST_SUITE(VclOutdevTest); CPPUNIT_TEST(testVirtualDevice); @@ -129,6 +130,7 @@ public: CPPUNIT_TEST(testDrawChord); CPPUNIT_TEST(testDrawCheckered); CPPUNIT_TEST(testDrawBorder); + CPPUNIT_TEST(testDrawWaveLine); CPPUNIT_TEST_SUITE_END(); }; @@ -1766,6 +1768,20 @@ void VclOutdevTest::testDrawBorder() pRectAction->GetRect()); } +void VclOutdevTest::testDrawWaveLine() +{ + ScopedVclPtrInstance<VirtualDevice> pVDev; + GDIMetaFile aMtf; + aMtf.Record(pVDev.get()); + + pVDev->SetOutputSizePixel(Size(100, 100)); + pVDev->DrawWaveLine(Point(0, 0), Point(50, 0)); + + MetaAction* pAction = aMtf.GetAction(INITIAL_SETUP_ACTION_COUNT); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a bitmap action", MetaActionType::BMPEXSCALEPART, + pAction->GetType()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(VclOutdevTest); CPPUNIT_PLUGIN_IMPLEMENT();
