[Libreoffice-commits] .: starmath/qa
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 23 09:08:26 PST 2012
starmath/qa/cppunit/test_nodetotextvisitors.cxx | 40 +++---------------------
1 file changed, 6 insertions(+), 34 deletions(-)
New commits:
commit 8f703e108acad813188f1698ab5be31981da017d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Nov 23 17:07:54 2012 +0000
convert the other test over as well
Change-Id: I82a68d8453b9053ac08e85e02fa011fcae852ca0
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index 95ea59c..ae72f52 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();
}
/*
More information about the Libreoffice-commits
mailing list