diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2001-10-06 09:16:31 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2001-10-06 09:16:31 +0000 |
| commit | 4c6c7e6474bef34c4bed0d3eb9889012319c938f (patch) | |
| tree | 8c92755d5109834b78ea620a224fd2ef75abeb09 /src/cppunit/TestResult.cpp | |
| parent | fbd454f554f13680fe62b36fb7a5829f6dc0c396 (diff) | |
| download | cppunit-4c6c7e6474bef34c4bed0d3eb9889012319c938f.tar.gz | |
Examples/cppunittest/CppUnitTestMain.
examples/cppunittest/CppUnitTestMain.cpp : application returns
0 is test suite run sucessfuly, 1 otherwise.
* src/cppunit/Exception.cpp : bug fix, operator =() with VC++.
Removed call to std::exception::operator =() which is bugged
on VC++.
* doc/FAQ : added a note explaining why the test
ExceptionTest.testAssignment used to fail.
* NEWS : updated and detailed.
* include/cppunit/TestResult.h :
* src/cppunit/TestResult.cpp : added reset().
* include/cppunit/TextTestRunner.h :
* src/cppunit/TextTestRunner.cpp : Constructor take an optional
TextTestRestult. The TextTestResult remain alive as long as
the runner. Added result() to retreive the result. Printing the
result is now optinal (enabled by default).
Diffstat (limited to 'src/cppunit/TestResult.cpp')
| -rw-r--r-- | src/cppunit/TestResult.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cppunit/TestResult.cpp b/src/cppunit/TestResult.cpp index b84a669..784ab32 100644 --- a/src/cppunit/TestResult.cpp +++ b/src/cppunit/TestResult.cpp @@ -25,6 +25,20 @@ TestResult::~TestResult() } +/** Resets the result for a new run. + * + * Clear the previous run result. + */ +void +TestResult::reset() +{ + ExclusiveZone zone( m_syncObject ); + m_testErrors = 0; + m_tests.clear(); + m_failures.clear(); +} + + /** Adds an error to the list of errors. * The passed in exception * caused the error |
