CppUnit project page | FAQ | CppUnit home page |
Record of a failed Test execution.A TestFailure collects a failed test together with the caught exception. More...
#include <TestFailure.h>
Public Member Functions | |
TestFailure (Test *failedTest, Exception *thrownException, bool isError) | |
Constructs a TestFailure with the given test and exception. | |
virtual | ~TestFailure () |
Deletes the owned exception. | |
virtual Test * | failedTest () const |
Gets the failed test. | |
virtual Exception * | thrownException () const |
Gets the thrown exception. Never NULL . | |
virtual SourceLine | sourceLine () const |
Gets the failure location. | |
virtual bool | isError () const |
Indicates if the failure is a failed assertion or an error. | |
virtual std::string | failedTestName () const |
Gets the name of the failed test. | |
virtual TestFailure * | clone () const |
Protected Attributes | |
Test * | m_failedTest |
Exception * | m_thrownException |
bool | m_isError |
Private Member Functions | |
TestFailure (const TestFailure &other) | |
TestFailure & | operator= (const TestFailure &other) |
Record of a failed Test execution.
A TestFailure collects a failed test together with the caught exception.
TestFailure assumes lifetime control for any exception passed to it.
CPPUNIT_NS_BEGIN TestFailure::TestFailure | ( | Test * | failedTest, |
Exception * | thrownException, | ||
bool | isError | ||
) |
Constructs a TestFailure with the given test and exception.
TestFailure::~TestFailure | ( | ) | [virtual] |
Deletes the owned exception.
TestFailure::TestFailure | ( | const TestFailure & | other | ) | [private] |
TestFailure * TestFailure::clone | ( | ) | const [virtual] |
Test * TestFailure::failedTest | ( | ) | const [virtual] |
Gets the failed test.
std::string TestFailure::failedTestName | ( | ) | const [virtual] |
Gets the name of the failed test.
bool TestFailure::isError | ( | ) | const [virtual] |
Indicates if the failure is a failed assertion or an error.
TestFailure& TestFailure::operator= | ( | const TestFailure & | other | ) | [private] |
SourceLine TestFailure::sourceLine | ( | ) | const [virtual] |
Gets the failure location.
Exception * TestFailure::thrownException | ( | ) | const [virtual] |
Gets the thrown exception. Never NULL
.
Test* TestFailure::m_failedTest [protected] |
bool TestFailure::m_isError [protected] |
Exception* TestFailure::m_thrownException [protected] |
|
hosts this site. |
Send comments to: CppUnit Developers |