sw/qa/extras/txtencexport/txtencexport.cxx |   20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

New commits:
commit 219436aa8c81e17b9a5b16cbd9ab7a2ec474817c
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed Mar 13 08:25:43 2024 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Mar 13 14:46:01 2024 +0100

    CppunitTest_sw_txtencexport: rework to avoid DECLARE_DOCBOOKEXPORT_TEST()
    
    No need go via Writer-specific macros.
    
    And in case the naming would be confusing, testBulletsNotHidden means
    that the hidden paragraph near the end of the document is hidden or not,
    it doesn't mean if the bullets are hidden or not.
    
    Change-Id: I8948b1c3fc9fe32e6d41405caab70bc349fa7c29
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164756
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/qa/extras/txtencexport/txtencexport.cxx 
b/sw/qa/extras/txtencexport/txtencexport.cxx
index 0ce191cc2cde..04f3ec26d386 100644
--- a/sw/qa/extras/txtencexport/txtencexport.cxx
+++ b/sw/qa/extras/txtencexport/txtencexport.cxx
@@ -14,10 +14,9 @@ namespace
 class TxtEncExportTest : public SwModelTestBase
 {
 public:
-    TxtEncExportTest(const OUString & rFilterOptions)
+    TxtEncExportTest()
         : SwModelTestBase("/sw/qa/extras/txtencexport/data/", "Text (encoded)")
     {
-        setFilterOptions(rFilterOptions);
     }
 
 protected:
@@ -37,15 +36,11 @@ protected:
     }
 };
 
-#define DECLARE_TXTENCEXPORT_TEST(TestName, filename, filterOptions, 
ClassName) \
-    class ClassName : public TxtEncExportTest {                                
 \
-    public:                                                                    
 \
-        ClassName() : TxtEncExportTest(filterOptions) {}                       
 \
-    };                                                                         
 \
-    DECLARE_SW_EXPORT_TEST(TestName, filename, nullptr, ClassName)
-
-DECLARE_TXTENCEXPORT_TEST(testBulletsNotHidden, "bullets.odt", "UTF8,,,,", 
TxtEncExportNotHiddenTest)
+CPPUNIT_TEST_FIXTURE(TxtEncExportTest, testBulletsNotHidden)
 {
+    createSwDoc("bullets.odt");
+    setFilterOptions("UTF8,,,,");
+    save(mpFilter);
     OString aData = readExportedFile();
 
     OUString aString = OStringToOUString(
@@ -70,8 +65,11 @@ DECLARE_TXTENCEXPORT_TEST(testBulletsNotHidden, 
"bullets.odt", "UTF8,,,,", TxtEn
     CPPUNIT_ASSERT_EQUAL(aExpected, aData);
 }
 
-DECLARE_TXTENCEXPORT_TEST(testBulletsHidden, "bullets.odt", "UTF8,,,,,false", 
TxtEncExportHiddenTest)
+CPPUNIT_TEST_FIXTURE(TxtEncExportTest, testBulletsHidden)
 {
+    createSwDoc("bullets.odt");
+    setFilterOptions("UTF8,,,,,false");
+    save(mpFilter);
     OString aData = readExportedFile();
 
     OUString aString = OStringToOUString(

Reply via email to