diff options
author | Attila Bakos <bakos.attilakaroly@nisz.hu> | 2020-08-06 16:39:41 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-08-22 17:43:27 +0200 |
commit | 5ac88d12b377f64ff36551bfb3cf95a4a23a167d (patch) | |
tree | 322dc928e8e06703436fb53caea9fcc87e01232a /sw/qa/extras/odfexport | |
parent | 5661e36bda03ccb580a653352cdc84335fd6410c (diff) |
tdf#129423 sw: Convert more tests to export-only
Remove early return to let the following assertXPath fail
where applicable.
Add an export-only unit test macro for ODF export as well.
Change-Id: Ib093f736b0aa24a9603da69ba9f74f25fd099c73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100421
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras/odfexport')
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index ee25f99822fe..715d9ad68d35 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -2022,13 +2022,11 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt") CPPUNIT_ASSERT_EQUAL(sal_Int16(2), nInt16); } -DECLARE_ODFEXPORT_TEST(testTableStyles3, "table_styles_3.odt") +DECLARE_ODFEXPORT_EXPORTONLY_TEST(testTableStyles3, "table_styles_3.odt") { CPPUNIT_ASSERT_EQUAL(1, getPages()); // This test checks if default valued attributes aren't exported. xmlDocUniquePtr pXmlDoc = parseExport("styles.xml"); - if (!pXmlDoc) - return; // <style:paragraph-properties> // For this element the only exported attributes are: "border-left", "border-bottom" @@ -2097,13 +2095,11 @@ DECLARE_ODFIMPORT_TEST(testTableStyles4, "table_styles_4.odt") CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00ff00), getProperty<sal_Int32>(xCell1Style, "BackColor")); } -DECLARE_ODFEXPORT_TEST(testTableStyles5, "table_styles_5.odt") +DECLARE_ODFEXPORT_EXPORTONLY_TEST(testTableStyles5, "table_styles_5.odt") { CPPUNIT_ASSERT_EQUAL(1, getPages()); // Test if cell styles doesn't have a style:parent-style-name attribute. xmlDocUniquePtr pXmlDoc = parseExport("styles.xml"); - if (!pXmlDoc) - return; assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.1']", "parent-style-name"); assertXPathNoAttribute(pXmlDoc, "/office:document-styles/office:styles/style:style[@style:display-name='Test style.2']", "parent-style-name"); @@ -2453,18 +2449,14 @@ DECLARE_ODFEXPORT_TEST(tdf118502, "tdf118502.odt") CPPUNIT_ASSERT(xReplacementGraphic.is()); } -DECLARE_ODFEXPORT_TEST(tdf99631, "tdf99631.docx") +DECLARE_ODFEXPORT_EXPORTONLY_TEST(tdf99631, "tdf99631.docx") { // check import of VisualArea settings of the embedded XLSX OLE objects xmlDocUniquePtr pXmlDoc = parseExport("Object 1/settings.xml"); - if (!pXmlDoc) - return; assertXPathContent(pXmlDoc, "//config:config-item[@config:name='VisibleAreaWidth']", "4515"); assertXPathContent(pXmlDoc, "//config:config-item[@config:name='VisibleAreaHeight']", "903"); xmlDocUniquePtr pXmlDoc2 = parseExport("Object 2/settings.xml"); - if (!pXmlDoc2) - return; assertXPathContent(pXmlDoc2, "//config:config-item[@config:name='VisibleAreaWidth']", "4515"); assertXPathContent(pXmlDoc2, "//config:config-item[@config:name='VisibleAreaHeight']", "1354"); } |