summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2011-10-05 16:00:44 +0100
committerMichael Meeks <michael.meeks@suse.com>2011-10-05 16:02:28 +0100
commit8a0d0457a79836fa9d8ea8d4c48ecbf7bac2e95b (patch)
tree242935d062542ef2993a4e0bc3aeb3f188bef1a4 /writerfilter
parent9767483eea7800aadd18b4489069ad633ce7a79c (diff)
test fix: use setUp and tearDown not constructors to init LibreOffice
It turns out the constructors are all run back-to-back one per filter, and we need to init and de-init in a sensible order to make multiple tests that otherwise share the ContentBroker work properly.
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/qa/cppunittests/rtftok/testrtftok.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
index d95728fe1e7a..9a012d3eec90 100644
--- a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
+++ b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx
@@ -37,7 +37,8 @@ using namespace ::com::sun::star;
class RtfTest : public test::FiltersTest
{
public:
- RtfTest();
+
+ virtual void setUp();
virtual bool load(const rtl::OUString &, const rtl::OUString &rURL, const rtl::OUString &);
void test();
@@ -49,8 +50,10 @@ private:
uno::Reference<document::XFilter> m_xFilter;
};
-RtfTest::RtfTest()
+void RtfTest::setUp()
{
+ test::FiltersTest::setUp();
+
m_xFilter = uno::Reference< document::XFilter >(m_xSFactory->createInstance(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Writer.RtfFilter"))),
uno::UNO_QUERY_THROW);