diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-04-13 11:13:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-04-13 13:15:25 +0100 |
commit | 8d7e8a0a3b9a4a4f7b805e91674b79a4cca7cf72 (patch) | |
tree | bb736d3ccaeb1732b552ae1f537c5f3ef0c41c0b /sal | |
parent | 452af5f4522e750627d0c0ac9fbc794aeb1f1f8f (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 'sal')
-rw-r--r-- | sal/cppunittester/cppunittester.cxx | 10 | ||||
-rw-r--r-- | sal/inc/cppunittester/protectorfactory.hxx | 9 |
2 files changed, 3 insertions, 16 deletions
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index ba21dacef325..22ac029c4240 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -180,7 +180,7 @@ SAL_IMPLEMENT_MAIN() { #endif boost::ptr_vector<osl::Module> modules; - cppunittester::LibreOfficeProtector *throw_protector = 0; + CppUnit::Protector *throw_protector = 0; CppUnit::TestResult result; std::string args; std::string testlib; @@ -231,14 +231,8 @@ SAL_IMPLEMENT_MAIN() { index+=3; } - bool ok = false; ProtectedFixtureFunctor tests(testlib, args, result); - //if the unoprotector was given on the command line, use it to catch - //and report the error message of exceptions - if (throw_protector) - ok = throw_protector->protect(tests); - else - ok = tests.run(); + bool ok = tests.run(); return ok ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/sal/inc/cppunittester/protectorfactory.hxx b/sal/inc/cppunittester/protectorfactory.hxx index 093eb5f5d588..b666412cb51d 100644 --- a/sal/inc/cppunittester/protectorfactory.hxx +++ b/sal/inc/cppunittester/protectorfactory.hxx @@ -38,16 +38,9 @@ namespace cppunittester { - class LibreOfficeProtector : public CppUnit::Protector - { - public: - virtual bool protect(CppUnit::Functor const & functor) = 0; - using CppUnit::Protector::protect; - }; - // The type of CppUnit::Protector factory functions that can be plugged into // cppunittester: - extern "C" typedef LibreOfficeProtector * SAL_CALL ProtectorFactory(); + extern "C" typedef CppUnit::Protector * SAL_CALL ProtectorFactory(); } #ifdef DISABLE_DYNLOADING |