From 3d82b08bcea45408b1998934558e2e28721125df Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 10 Mar 2016 11:06:29 +0100 Subject: [PATCH] These tests can just derive from plain CppUnit::TestFixture ...and then no longer need to override any base class setUp/tearDown Change-Id: Iaea19dfb341325bb45062d0ac0b5fa1eed0d34e0 --- oox/qa/unit/vba_compression.cxx | 18 +++--------------- oox/qa/unit/vba_encryption.cxx | 17 +---------------- ucb/qa/cppunit/webdav/webdav_local_neon.cxx | 21 +++------------------ 3 files changed, 7 insertions(+), 49 deletions(-) diff --git a/oox/qa/unit/vba_compression.cxx b/oox/qa/unit/vba_compression.cxx index 5302c165fc31..6541c8517411 100644 --- a/oox/qa/unit/vba_compression.cxx +++ b/oox/qa/unit/vba_compression.cxx @@ -7,17 +7,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include - #include #include #include #include #include +#include #include -class TestVbaCompression : public test::BootstrapFixtureBase +class TestVbaCompression : public CppUnit::TestFixture { public: @@ -42,10 +41,6 @@ public: // section 3.2.3 void testSpec323(); - // avoid the BootstrapFixtureBase::setUp and tearDown - virtual void setUp() override; - virtual void tearDown() override; - CPPUNIT_TEST_SUITE(TestVbaCompression); CPPUNIT_TEST(testSimple1); CPPUNIT_TEST(testSimple2); @@ -57,6 +52,7 @@ public: CPPUNIT_TEST_SUITE_END(); private: + test::Directories m_directories; }; namespace { @@ -237,14 +233,6 @@ void TestVbaCompression::testSpec323() } } -void TestVbaCompression::setUp() -{ -} - -void TestVbaCompression::tearDown() -{ -} - CPPUNIT_TEST_SUITE_REGISTRATION(TestVbaCompression); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/oox/qa/unit/vba_encryption.cxx b/oox/qa/unit/vba_encryption.cxx index 0e3c5abd806d..37dfeff636f4 100644 --- a/oox/qa/unit/vba_encryption.cxx +++ b/oox/qa/unit/vba_encryption.cxx @@ -7,8 +7,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include - #include #include #include @@ -16,7 +14,7 @@ #include #include -class TestVbaEncryption : public test::BootstrapFixtureBase +class TestVbaEncryption : public CppUnit::TestFixture { public: @@ -29,17 +27,11 @@ public: void testProjKey1(); - // avoid the BootstrapFixtureBase::setUp and tearDown - virtual void setUp() override; - virtual void tearDown() override; - CPPUNIT_TEST_SUITE(TestVbaEncryption); // CPPUNIT_TEST(testSimple1); // CPPUNIT_TEST(testSimple2); CPPUNIT_TEST(testProjKey1); CPPUNIT_TEST_SUITE_END(); - -private: }; #if 0 @@ -86,13 +78,6 @@ void TestVbaEncryption::testProjKey1() CPPUNIT_ASSERT_EQUAL((int)0xdf, (int)nProjKey); } -void TestVbaEncryption::setUp() -{ -} -void TestVbaEncryption::tearDown() -{ -} - CPPUNIT_TEST_SUITE_REGISTRATION(TestVbaEncryption); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/ucb/qa/cppunit/webdav/webdav_local_neon.cxx b/ucb/qa/cppunit/webdav/webdav_local_neon.cxx index d65e6f756de7..b509229cb853 100644 --- a/ucb/qa/cppunit/webdav/webdav_local_neon.cxx +++ b/ucb/qa/cppunit/webdav/webdav_local_neon.cxx @@ -7,7 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include +#include +#include #include #include "NeonUri.hxx" @@ -15,17 +16,10 @@ namespace { - class webdav_local_test: public test::BootstrapFixture + class webdav_local_test: public CppUnit::TestFixture { public: - webdav_local_test() : BootstrapFixture( true, true ) {} - - // initialise your test code values here. - void setUp( ) override; - - void tearDown( ) override; - void NeonUriTest(); // Change the following lines only, if you add, remove or rename @@ -37,15 +31,6 @@ namespace CPPUNIT_TEST_SUITE_END(); }; // class webdav_local_test - // initialise your test code values here. - void webdav_local_test::setUp() - { - } - - void webdav_local_test::tearDown() - { - } - void webdav_local_test::NeonUriTest() { //try URL decomposition