summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-04-13 11:13:19 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-13 13:15:25 +0100
commit8d7e8a0a3b9a4a4f7b805e91674b79a4cca7cf72 (patch)
treebb736d3ccaeb1732b552ae1f537c5f3ef0c41c0b /test
parent452af5f4522e750627d0c0ac9fbc794aeb1f1f8f (diff)
setup/teardown default component context once before/after all tests
avoids the problems of dangling uno singletons invalidated after the first dispose and the chain of other singletons that don't expect to need to re-initialize, etc. reenable editeng cppunit test inherit i18npool cppunit test from unotest base drop LibreOfficeProtector, do "throwable" work in setUp/tearDown not in ctors/dtors
Diffstat (limited to 'test')
-rw-r--r--test/source/bootstrapfixture.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index 284dbf7f3210..edb7b63b30a0 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -62,6 +62,12 @@ test::BootstrapFixture::BootstrapFixture( bool bAssertOnDialog, bool bNeedUCB )
: m_bNeedUCB( bNeedUCB )
, m_bAssertOnDialog( bAssertOnDialog )
{
+}
+
+void test::BootstrapFixture::setUp()
+{
+ test::BootstrapFixtureBase::setUp();
+
// force locale (and resource files loaded) to en-US
const LanguageType eLang=LANGUAGE_ENGLISH_US;
@@ -69,11 +75,7 @@ test::BootstrapFixture::BootstrapFixture( bool bAssertOnDialog, bool bNeedUCB )
MsLangId::convertLanguageToIsoNames(eLang, aLang, aCountry);
lang::Locale aLocale(aLang, aCountry, rtl::OUString());
ResMgr::SetDefaultLocale( aLocale );
-}
-void test::BootstrapFixture::setUp()
-{
- test::BootstrapFixtureBase::setUp();
if (m_bNeedUCB)
{
// initialise UCB-Broker
@@ -96,9 +98,8 @@ void test::BootstrapFixture::setUp()
aLocalOptions.SetUILocaleConfigString( aLangISO );
InitVCL(m_xSFactory);
- if (Application::IsHeadlessModeRequested()) {
+ if (Application::IsHeadlessModeRequested())
Application::EnableHeadlessMode(true);
- }
if( m_bAssertOnDialog )
ErrorHandler::RegisterDisplay( aBasicErrorFunc );