From 8f703e108acad813188f1698ab5be31981da017d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 23 Nov 2012 17:07:54 +0000 Subject: convert the other test over as well Change-Id: I82a68d8453b9053ac08e85e02fa011fcae852ca0 --- starmath/qa/cppunit/test_nodetotextvisitors.cxx | 40 ++++--------------------- 1 file changed, 6 insertions(+), 34 deletions(-) (limited to 'starmath/qa') 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 -#include -#include -#include -#include -#include -#include - #include - -#include -#include +#include #include #include @@ -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 xFactory(m_context->getServiceManager()); - uno::Reference 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(); } /* -- cgit