summaryrefslogtreecommitdiff
path: root/test/inc
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 /test/inc
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 'test/inc')
-rw-r--r--test/inc/test/bootstrapfixture.hxx8
-rw-r--r--test/inc/test/filters-test.hxx3
2 files changed, 8 insertions, 3 deletions
diff --git a/test/inc/test/bootstrapfixture.hxx b/test/inc/test/bootstrapfixture.hxx
index 53bb39dde0e3..3c7a91f4180e 100644
--- a/test/inc/test/bootstrapfixture.hxx
+++ b/test/inc/test/bootstrapfixture.hxx
@@ -48,8 +48,13 @@ namespace test {
// bootstrapping for unit tests, such that we can use
// almost an entire LibreOffice during compile - so
// that we can get pieces of code alone to beat them up.
+
+// NB. this class is instantiated multiple times during a
+// run of unit tests ...
class OOO_DLLPUBLIC_TEST BootstrapFixture : public CppUnit::TestFixture
{
+ bool m_bNeedUCB;
+ bool m_bAssertOnDialog;
::rtl::OUString m_aSrcRootURL;
::rtl::OUString m_aSrcRootPath;
@@ -73,6 +78,9 @@ public:
// return a URL to a given c-str path from the source directory
::rtl::OUString getURLFromSrc( const char *pPath );
+
+ virtual void setUp();
+ virtual void tearDown();
};
}
diff --git a/test/inc/test/filters-test.hxx b/test/inc/test/filters-test.hxx
index ab83c55e8f10..0cc77c09f4f4 100644
--- a/test/inc/test/filters-test.hxx
+++ b/test/inc/test/filters-test.hxx
@@ -54,9 +54,6 @@ public:
: BootstrapFixture(bAssertOnDialog, bNeedUCB)
{}
- virtual void setUp() {}
- virtual void tearDown() {}
-
void testDir(
//filter name
const rtl::OUString &rFilter,