diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-04-03 21:28:44 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-04-04 08:51:50 +0200 |
commit | 8f525d1a7e27279f4540ac692b9cb7af4a98dc25 (patch) | |
tree | e9dee2c99d90bb23a7b0ef7f06ec0410bd6a0483 /sw | |
parent | db02265eee005ab3c13be052c0cf9901a95c9b58 (diff) |
CppunitTest_sw_rtfimport: use CPPUNIT_TEST_FIXTURE()
In the single case where the usual DECLARE_... macro is not used.
Change-Id: I3c47976a0d78294e345569f28d264f752851d5e6
Reviewed-on: https://gerrit.libreoffice.org/70211
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 43 |
1 files changed, 14 insertions, 29 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 8e74f3fdcd04..fd87b50331cc 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -772,38 +772,23 @@ DECLARE_RTFIMPORT_TEST(testFdo68291, "fdo68291.odt") ->getPropertyValue("PageDescName")); } -class testTdf105511 : public Test +CPPUNIT_TEST_FIXTURE(Test, testTdf105511) { -protected: - virtual OUString getTestName() override { return OUString("testTdf105511"); } - -public: - CPPUNIT_TEST_SUITE(testTdf105511); - CPPUNIT_TEST(Import); - CPPUNIT_TEST_SUITE_END(); - - void Import() + struct DefaultLocale : public comphelper::ConfigurationProperty<DefaultLocale, OUString> { - struct DefaultLocale : public comphelper::ConfigurationProperty<DefaultLocale, OUString> + static OUString path() { - static OUString path() - { - return OUString("/org.openoffice.Office.Linguistic/General/DefaultLocale"); - } - ~DefaultLocale() = delete; - }; - auto batch = comphelper::ConfigurationChanges::create(); - DefaultLocale::set("ru-RU", batch); - batch->commit(); - executeImportTest("tdf105511.rtf", nullptr); - } - virtual void verify() override - { - OUString aExpected(u"\u0418\u043C\u044F"); - getParagraph(1, aExpected); - } -}; -CPPUNIT_TEST_SUITE_REGISTRATION(testTdf105511); + return OUString("/org.openoffice.Office.Linguistic/General/DefaultLocale"); + } + ~DefaultLocale() = delete; + }; + auto batch = comphelper::ConfigurationChanges::create(); + DefaultLocale::set("ru-RU", batch); + batch->commit(); + load(mpTestDocumentPath, "tdf105511.rtf"); + OUString aExpected(u"\u0418\u043C\u044F"); + getParagraph(1, aExpected); +} DECLARE_RTFIMPORT_TEST(testContSectionPageBreak, "cont-section-pagebreak.rtf") { |