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/cppunittester/cppunittester.cxx | |
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/cppunittester/cppunittester.cxx')
-rw-r--r-- | sal/cppunittester/cppunittester.cxx | 10 |
1 files changed, 2 insertions, 8 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; } |