diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-02-27 13:47:33 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-02-27 16:33:43 +0100 |
commit | 47ce4b87d8a13fc340794ffd9a10d5bd6a15e644 (patch) | |
tree | 1100d5ccde32f377ea0e7c4747739ac632471068 /framework/qa | |
parent | c2448e2bcedf0167bd099124e89fe88cbce321fc (diff) |
CppunitTest_framework_dispatch: use CPPUNIT_TEST_FIXTURE()
Change-Id: I2de32f700125fc8306c16fe4963ef76f87b0034c
Reviewed-on: https://gerrit.libreoffice.org/68435
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'framework/qa')
-rw-r--r-- | framework/qa/cppunit/dispatchtest.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/framework/qa/cppunit/dispatchtest.cxx b/framework/qa/cppunit/dispatchtest.cxx index b4b7851a3c56..66a0123f6e5c 100644 --- a/framework/qa/cppunit/dispatchtest.cxx +++ b/framework/qa/cppunit/dispatchtest.cxx @@ -130,6 +130,7 @@ uno::Reference<frame::XDispatch> MyInterceptor::queryDispatch(const util::URL& r /// Tests how InterceptionHelper invokes a registered interceptor. class DispatchTest : public test::BootstrapFixture, public unotest::MacrosTest { +protected: uno::Reference<uno::XComponentContext> mxComponentContext; uno::Reference<lang::XComponent> mxComponent; void dispatchCommand(const uno::Reference<lang::XComponent>& xComponent, const OUString& rCommand, const uno::Sequence<beans::PropertyValue>& rPropertyValues); @@ -137,11 +138,6 @@ class DispatchTest : public test::BootstrapFixture, public unotest::MacrosTest public: virtual void setUp() override; virtual void tearDown() override; - void testInterception(); - - CPPUNIT_TEST_SUITE(DispatchTest); - CPPUNIT_TEST(testInterception); - CPPUNIT_TEST_SUITE_END(); }; void DispatchTest::setUp() @@ -174,7 +170,7 @@ void DispatchTest::dispatchCommand(const uno::Reference<lang::XComponent>& xComp xDispatchHelper->executeDispatch(xFrame, rCommand, OUString(), 0, rPropertyValues); } -void DispatchTest::testInterception() +CPPUNIT_TEST_FIXTURE(DispatchTest, testInterception) { mxComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"); CPPUNIT_ASSERT(mxComponent.is()); @@ -196,8 +192,6 @@ void DispatchTest::testInterception() CPPUNIT_ASSERT_EQUAL(0, pInterceptor->getUnexpected()); } -CPPUNIT_TEST_SUITE_REGISTRATION(DispatchTest); - } CPPUNIT_PLUGIN_IMPLEMENT(); |