[Libreoffice-commits] core.git: sfx2/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Nov 7 12:16:17 UTC 2018
sfx2/qa/cppunit/test_misc.cxx | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)
New commits:
commit caec23449a21c0eacbb593330a5b22f8c60d58e8
Author: Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Tue Nov 6 21:46:03 2018 +0100
Commit: Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Wed Nov 7 13:13:32 2018 +0100
CppunitTest_sfx2_misc: use CPPUNIT_TEST_FIXTURE()
Allows not spelling out the test names 3 times.
Change-Id: I394bd4c796cb2bc65cacd9f61bd37162db48a810
Reviewed-on: https://gerrit.libreoffice.org/62976
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sfx2/qa/cppunit/test_misc.cxx b/sfx2/qa/cppunit/test_misc.cxx
index 2f419103cbd8..7022641db583 100644
--- a/sfx2/qa/cppunit/test_misc.cxx
+++ b/sfx2/qa/cppunit/test_misc.cxx
@@ -50,9 +50,6 @@ class MiscTest
{
public:
virtual void setUp() override;
- void testODFCustomMetadata();
- void testNoThumbnail();
- void testHardLinks();
virtual void registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx) override
{
@@ -64,14 +61,6 @@ public:
xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("foo"), BAD_CAST("http://foo.net"));
xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("baz"), BAD_CAST("http://baz.net"));
}
-
- CPPUNIT_TEST_SUITE(MiscTest);
- CPPUNIT_TEST(testODFCustomMetadata);
- CPPUNIT_TEST(testNoThumbnail);
- CPPUNIT_TEST(testHardLinks);
- CPPUNIT_TEST_SUITE_END();
-
-private:
};
void MiscTest::setUp()
@@ -81,7 +70,7 @@ void MiscTest::setUp()
SfxApplication::GetOrCreate();
}
-void MiscTest::testODFCustomMetadata()
+CPPUNIT_TEST_FIXTURE(MiscTest, testODFCustomMetadata)
{
uno::Reference<document::XDocumentProperties> const xProps(
::com::sun::star::document::DocumentProperties::create(m_xContext));
@@ -110,7 +99,7 @@ void MiscTest::testODFCustomMetadata()
aTempFile.EnableKillingFile();
}
-void MiscTest::testNoThumbnail()
+CPPUNIT_TEST_FIXTURE(MiscTest, testNoThumbnail)
{
// Load a document.
const OUString aURL(m_directories.getURLFromSrc("/sfx2/qa/cppunit/misc/hello.odt"));
@@ -160,7 +149,7 @@ void MiscTest::testNoThumbnail()
xComponent->dispose();
}
-void MiscTest::testHardLinks()
+CPPUNIT_TEST_FIXTURE(MiscTest, testHardLinks)
{
#ifndef _WIN32
OUString aSourceDir = m_directories.getURLFromSrc("/sfx2/qa/cppunit/misc/");
@@ -201,8 +190,6 @@ void MiscTest::testHardLinks()
#endif
}
-CPPUNIT_TEST_SUITE_REGISTRATION(MiscTest);
-
}
CPPUNIT_PLUGIN_IMPLEMENT();
More information about the Libreoffice-commits
mailing list