[Libreoffice-commits] core.git: framework/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Feb 27 15:34:11 UTC 2019


 framework/qa/cppunit/dispatchtest.cxx |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

New commits:
commit 47ce4b87d8a13fc340794ffd9a10d5bd6a15e644
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Feb 27 13:47:33 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Feb 27 16:33:43 2019 +0100

    CppunitTest_framework_dispatch: use CPPUNIT_TEST_FIXTURE()
    
    Change-Id: I2de32f700125fc8306c16fe4963ef76f87b0034c
    Reviewed-on: https://gerrit.libreoffice.org/68435
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

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();


More information about the Libreoffice-commits mailing list