diff --git a/headers/tools/cppunit/ThreadedTestCaller.h b/headers/tools/cppunit/ThreadedTestCaller.h index 090c77ae3f..daee1a1151 100644 --- a/headers/tools/cppunit/ThreadedTestCaller.h +++ b/headers/tools/cppunit/ThreadedTestCaller.h @@ -26,6 +26,7 @@ public: BThreadedTestCaller(std::string name, TestClass *object); virtual ~BThreadedTestCaller(); + virtual CppUnit::TestResult *run(); virtual void run(CppUnit::TestResult *result); //! Adds a thread to the test. \c threadName must be unique to this BThreadedTestCaller. @@ -97,6 +98,14 @@ BThreadedTestCaller::addThread(std::string threadN } } +template +CppUnit::TestResult * +BThreadedTestCaller::run() { + CppUnit::TestResult *result = new CppUnit::TestResult; + run(result); + return result; +} + template void BThreadedTestCaller::run(CppUnit::TestResult *result) { diff --git a/headers/tools/cppunit/cppunit/TextTestResult.h b/headers/tools/cppunit/cppunit/TextTestResult.h index 0e3937633f..0453ed8627 100644 --- a/headers/tools/cppunit/cppunit/TextTestResult.h +++ b/headers/tools/cppunit/cppunit/TextTestResult.h @@ -22,6 +22,7 @@ class CPPUNIT_API TextTestResult : public TestResult, public: TextTestResult(); + virtual void addFailure( Test *test, Exception *e ); virtual void addFailure( const TestFailure &failure ); virtual void startTest( Test *test ); virtual void print( std::ostream &stream ); diff --git a/src/tools/cppunit/cppunit/TextTestResult.cpp b/src/tools/cppunit/cppunit/TextTestResult.cpp index a8483b72b8..1fdc55a188 100644 --- a/src/tools/cppunit/cppunit/TextTestResult.cpp +++ b/src/tools/cppunit/cppunit/TextTestResult.cpp @@ -15,6 +15,13 @@ TextTestResult::TextTestResult() } +void +TextTestResult::addFailure( Test *test, Exception *e ) +{ + TestResult::addFailure( test, e ); +} + + void TextTestResult::addFailure( const TestFailure &failure ) {