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

tdf#99994: Add unittest

Change-Id: I1a58dc21fdcdf8e7688508105fbd6438c7f4bda0
Reviewed-on: https://gerrit.libreoffice.org/25690Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarXisco Faulí <anistenis@gmail.com>
üst c098b863
......@@ -60,6 +60,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools
void test47446();
void test47446b();
void testMaskText();
void testTdf99994();
Primitive2DSequence parseSvg(const char* aSource);
......@@ -90,6 +91,7 @@ public:
CPPUNIT_TEST(test47446);
CPPUNIT_TEST(test47446b);
CPPUNIT_TEST(testMaskText);
CPPUNIT_TEST(testTdf99994);
CPPUNIT_TEST_SUITE_END();
};
......@@ -607,6 +609,23 @@ void Test::testMaskText()
assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion", "familyname", "Times New Roman");
}
void Test::testTdf99994()
{
//Check text fontsize when using relative units
Primitive2DSequence aSequenceTdf99994 = parseSvg("/svgio/qa/cppunit/data/tdf99994.svg");
CPPUNIT_ASSERT_EQUAL(1, (int)aSequenceTdf99994.getLength());
Primitive2dXmlDump dumper;
xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequenceTdf99994));
CPPUNIT_ASSERT (pDocument);
assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "fontcolor", "#0000ff");
assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "height", "16");
assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "text", "test");
assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "familyname", "Sans");
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
}
......
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