diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-04-29 07:56:07 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-04-29 03:53:34 +0200 |
commit | 405bfa05226116d05f1b87c92d4760dbab184314 (patch) | |
tree | a592bddce5debd3298688d749961d1a167e15734 /vcl/qa | |
parent | ee1bf7e933dd858e9c6a6ec6bd38b31076413821 (diff) |
Add TextAlign,RasterOp to the SVM test
Change-Id: I58b7bb114864a9fdf901a92d54717964c6f1b68e
Reviewed-on: https://gerrit.libreoffice.org/71497
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/qa')
-rw-r--r-- | vcl/qa/cppunit/svm/svmtest.cxx | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx index 541822ef25e6..406eeb551360 100644 --- a/vcl/qa/cppunit/svm/svmtest.cxx +++ b/vcl/qa/cppunit/svm/svmtest.cxx @@ -141,7 +141,7 @@ class SvmTest : public test::BootstrapFixture, public XmlTestTools void checkOverLineColor(const GDIMetaFile& rMetaFile); void testOverLineColor(); - //void checkTextAlign(const GDIMetaFile& rMetaFile); + void checkTextAlign(const GDIMetaFile& rMetaFile); void testTextAlign(); //void checkMapMode(const GDIMetaFile& rMetaFile); @@ -153,7 +153,7 @@ class SvmTest : public test::BootstrapFixture, public XmlTestTools void checkPushPop(const GDIMetaFile& rMetaFile); void testPushPop(); - //void checkRasterOp(const GDIMetaFile& rMetaFile); + void checkRasterOp(const GDIMetaFile& rMetaFile); void testRasterOp(); //void checkTransparent(const GDIMetaFile& rMetaFile); @@ -1435,8 +1435,25 @@ void SvmTest::testOverLineColor() checkOverLineColor(writeAndRead(aGDIMetaFile, "overlinecolor.svm")); } +void SvmTest::checkTextAlign(const GDIMetaFile& rMetaFile) +{ + xmlDocPtr pDoc = dumpMeta(rMetaFile); + + assertXPathAttrs(pDoc, "/metafile/textalign[1]", { + {"align", "bottom"}, + }); +} + void SvmTest::testTextAlign() -{} +{ + GDIMetaFile aGDIMetaFile; + ScopedVclPtrInstance<VirtualDevice> pVirtualDev; + setupBaseVirtualDevice(*pVirtualDev, aGDIMetaFile); + + pVirtualDev->SetTextAlign(TextAlign::ALIGN_BOTTOM); + + checkTextAlign(writeAndRead(aGDIMetaFile, "textalign.svm")); +} void SvmTest::testMapMode() {} @@ -1480,8 +1497,25 @@ void SvmTest::testPushPop() checkPushPop(writeAndRead(aGDIMetaFile, "pushpop.svm")); } +void SvmTest::checkRasterOp(const GDIMetaFile& rMetaFile) +{ + xmlDocPtr pDoc = dumpMeta(rMetaFile); + + assertXPathAttrs(pDoc, "/metafile/rasterop[1]", { + {"operation", "xor"}, + }); +} + void SvmTest::testRasterOp() -{} +{ + GDIMetaFile aGDIMetaFile; + ScopedVclPtrInstance<VirtualDevice> pVirtualDev; + setupBaseVirtualDevice(*pVirtualDev, aGDIMetaFile); + + pVirtualDev->SetRasterOp(RasterOp::Xor); + + checkRasterOp(writeAndRead(aGDIMetaFile, "rasterop.svm")); +} void SvmTest::testTransparent() {} |