Kaydet (Commit) de32fe50 authored tarafından Xisco Fauli's avatar Xisco Fauli Kaydeden (comit) Xisco Faulí

SVG: Add unittest for tdf#47446 and tdf#98599

Change-Id: I86bec5694eb0c85596d2573111ddb355bd3ae09e
Reviewed-on: https://gerrit.libreoffice.org/24011Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarXisco Faulí <anistenis@gmail.com>
üst 473472ea
......@@ -57,6 +57,8 @@ class Test : public test::BootstrapFixture, public XmlTestTools
void testClipPathAndStyle();
void testi125329();
void testMaskingPath07b();
void test47446();
void test47446b();
Primitive2DSequence parseSvg(const char* aSource);
......@@ -84,6 +86,8 @@ public:
CPPUNIT_TEST(testClipPathAndStyle);
CPPUNIT_TEST(testi125329);
CPPUNIT_TEST(testMaskingPath07b);
CPPUNIT_TEST(test47446);
CPPUNIT_TEST(test47446b);
CPPUNIT_TEST_SUITE_END();
};
......@@ -484,6 +488,36 @@ void Test::testMaskingPath07b()
}
void Test::test47446()
{
//Check that marker's fill attribute is black is not set
Primitive2DSequence aSequence47446 = parseSvg("/svgio/qa/cppunit/data/47446.svg");
CPPUNIT_ASSERT_EQUAL(1, (int)aSequence47446.getLength());
Primitive2dXmlDump dumper;
xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence47446));
CPPUNIT_ASSERT (pDocument);
assertXPath(pDocument, "/primitive2D/transform/transform/transform/polypolygoncolor", "color", "#000000");
}
void Test::test47446b()
{
//Check that marker's fill attribute is inherit from def
Primitive2DSequence aSequence47446b = parseSvg("/svgio/qa/cppunit/data/47446b.svg");
CPPUNIT_ASSERT_EQUAL(1, (int)aSequence47446b.getLength());
Primitive2dXmlDump dumper;
xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequence47446b));
CPPUNIT_ASSERT (pDocument);
assertXPath(pDocument, "/primitive2D/transform/transform/transform/polypolygoncolor", "color", "#ffff00");
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
}
......
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment