[Libreoffice-commits] core.git: sw/qa

Daniel Arato (NISZ) (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 3 05:23:38 UTC 2020


 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit bc01e76bab663826c7c0f125cbbfc790f7de4a98
Author:     Daniel Arato (NISZ) <arato.daniel at nisz.hu>
AuthorDate: Mon Aug 31 13:28:06 2020 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Thu Sep 3 07:22:56 2020 +0200

    tdf#129423 sw: export-only tests, part 7
    
    Convert some unit tests from "export" tests to "export only".
    Remove nullptr checks on parseExport's return value to make
    the tests fail if parsing fails for any reason.
    
    Change-Id: I11307932b216d0bfe60a3ef126bbea13046fa0a0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101718
    Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 2596c8d5d5e4..76ccf318e8c9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -489,14 +489,12 @@ DECLARE_OOXMLEXPORT_TEST(testSmartart, "smartart.docx")
     CPPUNIT_ASSERT_EQUAL(OUString("RenderedShapes"), nValue); // Rendered bitmap has the proper name
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFontNameIsEmpty, "font-name-is-empty.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFontNameIsEmpty, "font-name-is-empty.docx")
 {
     // Check no empty font name is exported
     // This test does not fail, if the document contains a font with empty name.
 
     xmlDocUniquePtr pXmlFontTable = parseExport("word/fontTable.xml");
-    if (!pXmlFontTable)
-        return;
     xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlFontTable, "/w:fonts/w:font");
     xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
     sal_Int32 length = xmlXPathNodeSetGetLength(pXmlNodes);
@@ -1109,14 +1107,12 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testArrowMarker, "tdf123346_ArrowMarker.docx
         "/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:tailEnd", "type", "arrow");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testShapeLineWidth, "tdf92526_ShapeLineWidth.odt")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testShapeLineWidth, "tdf92526_ShapeLineWidth.odt")
 {
     CPPUNIT_ASSERT_EQUAL(1, getShapes());
     CPPUNIT_ASSERT_EQUAL(1, getPages());
     // tdf#92526: Make sure that line with stays 0.
     xmlDocUniquePtr pXml = parseExport("word/document.xml");
-    if (!pXml)
-        return;
 
     // "w" attribute was not exported.
     assertXPath(pXml, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing"


More information about the Libreoffice-commits mailing list