sw/qa/extras/rtfimport/rtfimport.cxx | 43 +++++++++++------------------------ 1 file changed, 14 insertions(+), 29 deletions(-)
New commits: commit 8f525d1a7e27279f4540ac692b9cb7af4a98dc25 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Wed Apr 3 21:28:44 2019 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Apr 4 08:51:50 2019 +0200 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 <vmik...@collabora.com> 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") { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits