CppUnit project page FAQ CppUnit home page

TestFailure Class Reference
[Browsing collected test result]

Record of a failed Test execution. More...

#include <TestFailure.h>

Collaboration diagram for TestFailure:

Collaboration graph
[legend]

List of all members.

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 TestfailedTest () const
 Gets the failed test.
virtual ExceptionthrownException () 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 TestFailureclone () const

Protected Attributes

Testm_failedTest
Exceptionm_thrownException
bool m_isError

Private Member Functions

 TestFailure (const TestFailure &other)
TestFailureoperator= (const TestFailure &other)


Detailed Description

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.


Constructor & Destructor Documentation

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]


Member Function Documentation

Test * TestFailure::failedTest (  )  const [virtual]

Gets the failed test.

Exception * TestFailure::thrownException (  )  const [virtual]

Gets the thrown exception. Never NULL.

SourceLine TestFailure::sourceLine (  )  const [virtual]

Gets the failure location.

bool TestFailure::isError (  )  const [virtual]

Indicates if the failure is a failed assertion or an error.

std::string TestFailure::failedTestName (  )  const [virtual]

Gets the name of the failed test.

TestFailure * TestFailure::clone (  )  const [virtual]

TestFailure& TestFailure::operator= ( const TestFailure other  )  [private]


Member Data Documentation

Test* TestFailure::m_failedTest [protected]

Exception* TestFailure::m_thrownException [protected]

bool TestFailure::m_isError [protected]


The documentation for this class was generated from the following files:
SourceForge Logo hosts this site. Send comments to:
CppUnit Developers