diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-11-23 17:07:54 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-11-23 17:07:54 +0000 |
commit | 8f703e108acad813188f1698ab5be31981da017d (patch) | |
tree | e7cc586f60a5e0723a2d0cf0c712ba0cd344fb7f /starmath | |
parent | 35c6bd77044c7c1c10bb5d42d781805751a1d8d8 (diff) |
convert the other test over as well
Change-Id: I82a68d8453b9053ac08e85e02fa011fcae852ca0
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/qa/cppunit/test_nodetotextvisitors.cxx | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx index 95ea59c6bcf2..ae72f525adea 100644 --- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx +++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx @@ -26,18 +26,8 @@ * instead of those above. */ -#include <sal/types.h> -#include <cppunit/TestSuite.h> -#include <cppunit/TestFixture.h> -#include <cppunit/TestCase.h> -#include <cppunit/plugin/TestPlugIn.h> -#include <cppunit/extensions/HelperMacros.h> -#include <cppunit/TestAssert.h> - #include <sal/config.h> - -#include <cppuhelper/bootstrap.hxx> -#include <comphelper/processfactory.hxx> +#include <test/bootstrapfixture.hxx> #include <vcl/svapp.hxx> #include <smdll.hxx> @@ -80,11 +70,9 @@ using namespace ::com::sun::star; namespace { -class Test : public CppUnit::TestFixture { -public: - Test(); - ~Test(); +class Test : public test::BootstrapFixture { +public: // init virtual void setUp(); virtual void tearDown(); @@ -133,35 +121,19 @@ private: void ParseAndCheck(const char *input, const char *expected, const char *test_name); }; -Test::Test() +void Test::setUp() { - m_context = cppu::defaultBootstrap_InitialComponentContext(); - - uno::Reference<lang::XMultiComponentFactory> xFactory(m_context->getServiceManager()); - uno::Reference<lang::XMultiServiceFactory> xSM(xFactory, uno::UNO_QUERY_THROW); - - //Without this we're crashing because callees are using - //getProcessServiceFactory. In general those should be removed in favour - //of retaining references to the root ServiceFactory as its passed around - comphelper::setProcessServiceFactory(xSM); - - InitVCL(); + BootstrapFixture::setUp(); SmGlobals::ensure(); -} -void Test::setUp() -{ xDocShRef = new SmDocShell(SFXOBJECTSHELL_STD_NORMAL); } void Test::tearDown() { xDocShRef.Clear(); -} - -Test::~Test() -{ + BootstrapFixture::tearDown(); } /* |