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

Shivam Kumar Singh (via logerrit) logerrit at kemper.freedesktop.org
Sat Jan 25 08:14:13 UTC 2020


 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx |    8 ++------
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx |   30 ++++++++++--------------------
 2 files changed, 12 insertions(+), 26 deletions(-)

New commits:
commit 6ffaefa1694f71175bb499cd5ee5886b23874e90
Author:     Shivam Kumar Singh <shivamhere247 at gmail.com>
AuthorDate: Wed Jan 22 21:43:57 2020 +0530
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sat Jan 25 09:13:41 2020 +0100

    tdf#129423: Make export tests export-only where applicable
    
    Change-Id: Iff36608e3f1d643175e47a96333df4cb80a88064
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87209
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index abadb9765aa1..05466e36b70f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -768,15 +768,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104707_urlComment, "tdf104707_urlComment.odt")
     CPPUNIT_ASSERT_EQUAL(OUString("https://bugs.documentfoundation.org/show_bug.cgi?id=104707"), aURL);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testOLEObjectinHeader, "2129393649.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testOLEObjectinHeader, "2129393649.docx")
 {
     // fdo#76015 : Document contains oleobject in header xml.
     // Problem was relationship entry for oleobject from header was
     // exported into document.xml.rels file because of this rels file
     // for headers were missing from document/word/rels.
     xmlDocPtr pXmlDoc = parseExport("word/_rels/header1.xml.rels");
-    if(!pXmlDoc)
-        return;
 
     assertXPath(pXmlDoc,"/rels:Relationships/rels:Relationship[1]","Id","rId1");
 
@@ -910,12 +908,10 @@ DECLARE_OOXMLEXPORT_TEST(testTCTagMisMatch, "TCTagMisMatch.docx")
    assertXPath(pXmlDoc,"/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]", 1);
 }
 
-DECLARE_OOXMLEXPORT_TEST(testFDO78292, "FDO78292.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78292, "FDO78292.docx")
 {
    //text node is a leaf node, it should not have any children
    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-   if(!pXmlDoc)
-      return;
    assertXPath(pXmlDoc,"/w:document/w:body/w:p[14]/w:sdt[3]/w:sdtPr[1]/w:text/w14:checked",0);
 }
 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 9cc5e69775cf..b59a14a89619 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -109,22 +109,18 @@ DECLARE_OOXMLEXPORT_TEST(testDecimalNumberingNoLeveltext, "decimal-numbering-no-
         assertXPath (pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:lvlText","val", "");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testNoDuplicateAttributeExport, "duplicate-east-asia.odt")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testNoDuplicateAttributeExport, "duplicate-east-asia.odt")
 {
     // File asserting while saving in LO.
-    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
+    parseExport("word/document.xml");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testfdo79008, "fdo79008.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79008, "fdo79008.docx")
 {
     /* File crashing while saving in LO.
      * Check if document.xml file is created after fix
      */
-    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
+     parseExport("word/document.xml");
 }
 
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAuthorPropertySdt, "author-property.docx")
@@ -239,18 +235,14 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testOldComplexMergeleft, "tdf90681-2.odt")
     assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[2]/w:tc[1]/w:tcPr/w:vMerge", "val", "continue");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testOldComplexMergeTableInTable, "ooo96040-2.odt")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testOldComplexMergeTableInTable, "ooo96040-2.odt")
 {
-    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
+    parseExport("word/document.xml");
 }
 
-DECLARE_OOXMLEXPORT_TEST(testHyperlinkContainingPlaceholderField, "hyperlink-field.odt")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testHyperlinkContainingPlaceholderField, "hyperlink-field.odt")
 {
-    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
+    parseExport("word/document.xml");
 }
 
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTablePreferredWidth, "tablePreferredWidth.docx")
@@ -505,14 +497,12 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(tdf118702,"tdf118702.odt")
     assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:sectPr/w:pgSz", "orient", "landscape" );
 }
 
-DECLARE_OOXMLEXPORT_TEST(testfdo79822, "fdo79822.docx")
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79822, "fdo79822.docx")
 {
     /* File getting crash while saving in LO.
      * The Docx contain smartart and the file was created in ms word 2007
      */
-    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
-    if (!pXmlDoc)
-        return;
+    parseExport("word/document.xml");
 }
 
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO79915, "fdo79915.docx")


More information about the Libreoffice-commits mailing list