Kaydet (Commit) d3721e50 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Handle CppUnit::DynamicLibraryManagerException

Change-Id: I81f9b133ffb03c225b276639f60ad5e7f38ec1ef
üst b2315f6b
......@@ -53,6 +53,7 @@
#include "cppunit/TestRunner.h"
#include "cppunit/extensions/TestFactoryRegistry.h"
#include "cppunit/plugin/PlugInManager.h"
#include "cppunit/plugin/DynamicLibraryManagerException.h"
#include "cppunit/portability/Stream.h"
#include "boost/noncopyable.hpp"
......@@ -137,7 +138,12 @@ public:
// we statically link to the app executable.
#else
CppUnit::PlugInManager manager;
manager.load(testlib, args);
try {
manager.load(testlib, args);
} catch (const CppUnit::DynamicLibraryManagerException &e) {
fprintf(stderr, "%s\n", e.what());
return false;
}
#endif
CppUnit::TestRunner runner;
runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment