summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-11-22 08:29:07 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-11-22 08:29:07 +0100
commit1465fd6537b6b5bd8ee9b9414519a26fbc0b5621 (patch)
tree5f5e77928e677767fb2e14d4e98f603c2057f43f /sal
parent53368ae38955c171039132090507b6000b35862f (diff)
Fail fast
Change-Id: I17d6ab71ec7bcf40dccb2c9ffe3d9f2e6b10f01c
Diffstat (limited to 'sal')
-rw-r--r--sal/cppunittester/cppunittester.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index 84e0e1e7ed98..e8584c1edcab 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -120,7 +120,6 @@ public:
}
bool run() const
{
- bool bSuccess = false;
#ifdef DISABLE_DYNLOADING
// For iOS cppunit plugins aren't really "plugins" (shared
// libraries), but just static archives. In the real main
@@ -128,14 +127,13 @@ public:
// the SAL_IMPLEMENT_MAIN() below expands to, we specifically
// call the initialize methods of the CppUnitTestPlugIns that
// we statically link to the app executable.
- bSuccess = true;
#else
CppUnit::PlugInManager manager;
try {
manager.load(testlib, args);
- bSuccess = true;
} catch (const CppUnit::DynamicLibraryManagerException &e) {
std::cerr << "DynamicLibraryManagerException: \"" << e.what() << "\"\n";
+ return false;
}
#endif
CppUnit::TestRunner runner;
@@ -158,7 +156,7 @@ public:
result.popProtector();
CppUnit::CompilerOutputter(&collector, CppUnit::stdCErr()).write();
- return bSuccess && collector.wasSuccessful();
+ return collector.wasSuccessful();
}
virtual bool operator()() const
{