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

Miklos Vajna vmiklos at collabora.co.uk
Wed Nov 5 00:48:38 PST 2014


 sw/qa/extras/inc/swmodeltestbase.hxx |   29 -----------------------------
 sw/qa/extras/mailmerge/mailmerge.cxx |   29 +++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit 428f1a2755dd1753cebfc434306773a0aa1ed6d8
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Nov 5 09:39:58 2014 +0100

    CppunitTest_sw_mailmerge: move executeMailMergeTest() from header file
    
    Change-Id: Ia1cfe9f65fe7c7be0c93ad03a6c34c57ffa4b45e

diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index fbfb107..aae1f4d 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -296,35 +296,6 @@ protected:
     }
 
     /**
-     * Helper func used by each unit test to test the 'mail merge' code.
-     *
-     * Registers the data source, loads the original file as reference,
-     * initializes the mail merge job and its default argument sequence.
-     *
-     * The 'verify' method actually has to execute the mail merge by
-     * calling executeMailMerge() after modifying the job arguments.
-     */
-    void executeMailMergeTest(const char* filename, const char* datasource, const char* tablename = 0)
-    {
-        header();
-        preTest(filename);
-        load(mpTestDocumentPath, filename);
-
-        const OUString aPrefix( "LOMM_" );
-        utl::TempFile aTempDir(nullptr, true);
-        const OUString aWorkDir = aTempDir.GetURL();
-        const OUString aURI( getURLFromSrc(mpTestDocumentPath) + OUString::createFromAscii(datasource) );
-        OUString aDBName = registerDBsource( aURI, aPrefix, aWorkDir );
-        initMailMergeJobAndArgs( filename, tablename, aDBName, aPrefix, aWorkDir );
-
-        postTest(filename);
-        verify();
-        finish();
-
-        ::utl::removeTree(aWorkDir);
-    }
-
-    /**
      * Function overloaded by unit test. See DECLARE_SW_*_TEST macros
      */
     virtual void verify()
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx
index defb387..1260d69 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -35,6 +35,35 @@ class MMTest : public SwModelTestBase
 {
     public:
         MMTest() : SwModelTestBase("/sw/qa/extras/mailmerge/data/", "writer8") {}
+    /**
+     * Helper func used by each unit test to test the 'mail merge' code.
+     *
+     * Registers the data source, loads the original file as reference,
+     * initializes the mail merge job and its default argument sequence.
+     *
+     * The 'verify' method actually has to execute the mail merge by
+     * calling executeMailMerge() after modifying the job arguments.
+     */
+    void executeMailMergeTest(const char* filename, const char* datasource, const char* tablename = 0)
+    {
+        header();
+        preTest(filename);
+        load(mpTestDocumentPath, filename);
+
+        const OUString aPrefix( "LOMM_" );
+        utl::TempFile aTempDir(nullptr, true);
+        const OUString aWorkDir = aTempDir.GetURL();
+        const OUString aURI( getURLFromSrc(mpTestDocumentPath) + OUString::createFromAscii(datasource) );
+        OUString aDBName = registerDBsource( aURI, aPrefix, aWorkDir );
+        initMailMergeJobAndArgs( filename, tablename, aDBName, aPrefix, aWorkDir );
+
+        postTest(filename);
+        verify();
+        finish();
+
+        ::utl::removeTree(aWorkDir);
+    }
+
 };
 
 #define DECLARE_MAILMERGE_TEST(TestName, filename, datasource, tablename, BaseClass) \


More information about the Libreoffice-commits mailing list