sw/qa/extras/odfexport/odfexport2.cxx |   17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

New commits:
commit 82525bbd39d213d54d03b264fd78157e8f741f03
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Tue Jan 18 20:09:04 2022 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Jan 19 08:07:23 2022 +0100

    CppunitTest_sw_odfexport2: rework to avoid mustTestImportOf()
    
    See commit a226cec52e536c46e03f57a5f1f7931abbeb0cdd
    (CppunitTest_sw_rtfimport: convert one testcase to use
    CPPUNIT_TEST_FIXTURE(), 2019-11-05) for motivation.
    
    Change-Id: Id6d45cfa011a45b0e8ef9f486498d6a89af8e49f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128574
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/qa/extras/odfexport/odfexport2.cxx 
b/sw/qa/extras/odfexport/odfexport2.cxx
index c9eb4cdd18aa..c931aefd30ca 100644
--- a/sw/qa/extras/odfexport/odfexport2.cxx
+++ b/sw/qa/extras/odfexport/odfexport2.cxx
@@ -17,14 +17,6 @@ class Test : public SwModelTestBase
 public:
     Test() : SwModelTestBase("/sw/qa/extras/odfexport/data/", "writer8") {}
 
-    /**
-     * Denylist handling
-     */
-    bool mustTestImportOf(const char* filename) const override {
-        // Only test import of .odt document
-        return OString(filename).endsWith(".odt");
-    }
-
     bool mustValidate(const char* /*filename*/) const override
     {
         return true;
@@ -79,8 +71,9 @@ DECLARE_ODFEXPORT_TEST(testTdf143793_noBodyWrapping, 
"tdf143793_noBodyWrapping.o
     CPPUNIT_ASSERT_MESSAGE("Header text should fill two lines", nParaHeight > 
400);
 }
 
-DECLARE_ODFEXPORT_TEST(testTdf137199, "tdf137199.docx")
+CPPUNIT_TEST_FIXTURE(Test, testTdf137199)
 {
+    loadAndReload("tdf137199.docx");
     CPPUNIT_ASSERT_EQUAL(OUString(">1<"), 
getProperty<OUString>(getParagraph(1), "ListLabelString"));
 
     CPPUNIT_ASSERT_EQUAL(OUString("1)"), 
getProperty<OUString>(getParagraph(2), "ListLabelString"));
@@ -97,8 +90,9 @@ DECLARE_ODFEXPORT_TEST(testTdf143605, "tdf143605.odt")
     CPPUNIT_ASSERT_EQUAL(OUString("."), getProperty<OUString>(getParagraph(1), 
"ListLabelString"));
 }
 
-DECLARE_ODFEXPORT_TEST(testListFormatDocx, "listformat.docx")
+CPPUNIT_TEST_FIXTURE(Test, testListFormatDocx)
 {
+    loadAndReload("listformat.docx");
     // Ensure in resulting ODT we also have not just prefix/suffix, but custom 
delimiters
     CPPUNIT_ASSERT_EQUAL(OUString(">1<"), 
getProperty<OUString>(getParagraph(1), "ListLabelString"));
     CPPUNIT_ASSERT_EQUAL(OUString(">>1/1<<"), 
getProperty<OUString>(getParagraph(2), "ListLabelString"));
@@ -217,7 +211,6 @@ CPPUNIT_TEST_FIXTURE(Test, testStyleLink)
     CPPUNIT_ASSERT_EQUAL(OUString("List Paragraph Char"), 
getProperty<OUString>(aParaStyle, "LinkStyle"));
 }
 
-// This test started in LO 7.2. Use the odfexport.cxx if you intend to 
backport to 7.1.
-
 CPPUNIT_PLUGIN_IMPLEMENT();
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to