diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2001-10-03 20:16:12 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2001-10-03 20:16:12 +0000 |
| commit | c2ac2ac3bcfb30cb8ae4e95e531f1b630b8dd80e (patch) | |
| tree | 090517dbef21bb46ad096008a54cfdedd4066d3a /include/cppunit/TestFailure.h | |
| parent | ddfca2261132a879f631cbaaf22e82feaa2460ef (diff) | |
| download | cppunit-c2ac2ac3bcfb30cb8ae4e95e531f1b630b8dd80e.tar.gz | |
Include/cppunit/TestFailure.
include/cppunit/TestFailure.cpp :
* include/cppunit/TestFailure.h : fixed some constness issues. Added
argument to indicate the type of failure to constructor. Added
isError().
* include/cppunit/TestListener.h : removed addError(). addFailure()
now take a TestFailure as argument.
* include/cppunit/TestResult.h :
* include/cppunit/TestResult.cpp : removed errors(). Refactored. Fixed
some constness issues. Added typedef TestFailures for vector returned
by failures(). failures() returns a const reference on the list of
failure. added testFailuresTotal(). Constructor can take an optional
synchronization object.
* include/cppunit/TextTestResult.h :
* include/cppunit/TextTestResult.cpp : removed printErrors().
Refactored. Updated to suit new TestResult, errors and failures are
reported in the same list.
* examples/cppunittest/TestFailureTest.cpp :
* examples/cppunittest/TestFailureTest.h : modified to use the new
TestFailure constructor. Added one test.
* examples/cppunittest/TestListenerTest.cpp: removed addError().
Refactored to suit new TestListener.
* examples/cppunittest/TestResultTest.h :
* examples/cppunittest/TestResultTest.cpp : modified to suit the
new TestResult.
Diffstat (limited to 'include/cppunit/TestFailure.h')
| -rw-r--r-- | include/cppunit/TestFailure.h | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/include/cppunit/TestFailure.h b/include/cppunit/TestFailure.h index b5d095c..9285a1b 100644 --- a/include/cppunit/TestFailure.h +++ b/include/cppunit/TestFailure.h @@ -1,6 +1,7 @@ #ifndef CPPUNIT_TESTFAILURE_H // -*- C++ -*- #define CPPUNIT_TESTFAILURE_H +#include <cppunit/Portability.h> #include <string> namespace CppUnit { @@ -20,33 +21,30 @@ class Exception; class TestFailure { public: - TestFailure (Test *failedTest, Exception *thrownException); - virtual ~TestFailure (); + TestFailure( Test *failedTest, + Exception *thrownException, + bool isError ); - Test* failedTest (); + virtual ~TestFailure (); - Exception* thrownException (); - - std::string toString () const; + Test *failedTest() const; + + Exception *thrownException() const; + + bool isError() const; + + std::string toString() const; protected: - Test *m_failedTest; - Exception *m_thrownException; + Test *m_failedTest; + Exception *m_thrownException; + bool m_isError; private: - TestFailure (const TestFailure& other); - TestFailure& operator= (const TestFailure& other); + TestFailure( const TestFailure &other ); + TestFailure &operator =( const TestFailure& other ); }; -/// Gets the failed test. -inline Test *TestFailure::failedTest () -{ return m_failedTest; } - - -/// Gets the thrown exception. -inline Exception *TestFailure::thrownException () -{ return m_thrownException; } - } // namespace CppUnit |
