summaryrefslogtreecommitdiff
path: root/hwpfilter/qa
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 /hwpfilter/qa
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 'hwpfilter/qa')
-rw-r--r--hwpfilter/qa/cppunit/test_hwpfilter.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/hwpfilter/qa/cppunit/test_hwpfilter.cxx b/hwpfilter/qa/cppunit/test_hwpfilter.cxx
index a0451ed63ea8..2e96284da31f 100644
--- a/hwpfilter/qa/cppunit/test_hwpfilter.cxx
+++ b/hwpfilter/qa/cppunit/test_hwpfilter.cxx
@@ -40,10 +40,8 @@ namespace
class HwpFilterTest : public test::FiltersTest
{
public:
- HwpFilterTest();
-
+ virtual void setUp();
virtual bool load(const rtl::OUString &, const rtl::OUString &rURL, const rtl::OUString &);
-
void test();
CPPUNIT_TEST_SUITE(HwpFilterTest);
@@ -53,13 +51,14 @@ namespace
uno::Reference<document::XFilter> m_xFilter;
};
- HwpFilterTest::HwpFilterTest()
+ void HwpFilterTest::setUp()
{
+ test::FiltersTest::setUp();
+
m_xFilter = uno::Reference< document::XFilter >(m_xSFactory->createInstance(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.comp.hwpimport.HwpImportFilter"))),
uno::UNO_QUERY_THROW);
-
}
bool HwpFilterTest::load(const rtl::OUString &,