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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Sat May 30 11:27:21 UTC 2020


 sw/qa/extras/odfexport/odfexport.cxx      |    1 +
 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx |    2 ++
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx |    2 ++
 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx |    2 ++
 sw/qa/extras/ww8export/ww8export.cxx      |    1 +
 5 files changed, 8 insertions(+)

New commits:
commit 4daf5f4281fe1aa2aca9d3c28005cb6c921b1451
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Sat May 30 12:28:20 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Sat May 30 13:26:42 2020 +0200

    CppUnittest: sw: add missing asserts in odf files
    
    found by bin/check-missing-export-asserts.py
    
    Change-Id: Iec44803b9ab3b337857d2c5b636632796308321c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95179
    Tested-by: Xisco Fauli <xiscofauli at libreoffice.org>
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 540e6359dd1f..8e8da439d3f3 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1684,6 +1684,7 @@ DECLARE_ODFEXPORT_TEST(testOdtBorderTypes, "border_types.odt")
 
 DECLARE_ODFEXPORT_TEST(testMasterPageWithDrawingPage, "sw_hatch.odt")
 {
+    CPPUNIT_ASSERT_EQUAL(1, getPages());
     uno::Reference<container::XNameAccess> xStyles(getStyles("PageStyles"));
     uno::Reference<beans::XPropertySet> xStyle(xStyles->getByName("Standard"), uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_HATCH, getProperty<drawing::FillStyle>(xStyle, "FillStyle"));
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index e9dde46e3752..336e99b26507 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -1143,6 +1143,8 @@ DECLARE_OOXMLEXPORT_TEST(testArrowMarker, "tdf123346_ArrowMarker.docx")
 
 DECLARE_OOXMLEXPORT_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)
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 74e98cfb49da..6018c417ad47 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -1275,6 +1275,8 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testSpacingGroupShapeText, "tdf131775_Spacin
 
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf100581, "tdf100581.odt")
 {
+    CPPUNIT_ASSERT_EQUAL(1, getShapes());
+    CPPUNIT_ASSERT_EQUAL(1, getPages());
     xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
 
     assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index 71696adeb6be..292af20ac9ee 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -889,6 +889,8 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo80895, "fdo80895.docx")
 
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf118242, "tdf118242.odt")
 {
+    CPPUNIT_ASSERT_EQUAL(3, getShapes());
+    CPPUNIT_ASSERT_EQUAL(1, getPages());
     xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
 
     assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor"
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index b1ca079711bd..fb27544c7622 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -1320,6 +1320,7 @@ DECLARE_WW8EXPORT_TEST(tesTdf91083_tableKeep2, "tdf91083_tableKeep2.odt")
 
 DECLARE_WW8EXPORT_TEST(tesTdf91083_tableKeep3, "tdf91083_tableKeep3.odt")
 {
+    CPPUNIT_ASSERT_EQUAL(3, getPages());
     //emulate table "keep with next" - split single row table in order to keep with previous paragraph
     CPPUNIT_ASSERT_EQUAL_MESSAGE("Table doesn't split, so it starts on page 2",
                                  OUString("0"), parseDump("count(//page[1]//tab)") );


More information about the Libreoffice-commits mailing list