CppUnit project page FAQ CppUnit home page

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

CppUnit::TestFailure Class Reference
[Browsing collected test result]

Record of a failed Test execution. More...

#include <TestFailure.h>

List of all members.

Public Methods

 TestFailure (Test *failedTest, Exception *thrownException, bool isError)
 Constructs a TestFailure with the given test and exception. More...

virtual ~TestFailure ()
 Deletes the owned exception. More...

virtual TestfailedTest () const
 Gets the failed test. More...

virtual ExceptionthrownException () const
 Gets the thrown exception. Never NULL. More...

virtual SourceLine sourceLine () const
 Gets the failure location. More...

virtual bool isError () const
 Indicates if the failure is a failed assertion or an error. More...

virtual std::string failedTestName () const
 Gets the name of the failed test. More...

virtual std::string toString () const
 Returns a short description of the failure. More...

virtual TestFailure * clone () const

Protected Attributes

Testm_failedTest
Exceptionm_thrownException
bool m_isError

Private Methods

 TestFailure (const TestFailure &other)
TestFailure & operator= (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::TestFailure::TestFailure Test   failedTest,
Exception   thrownException,
bool    isError
 

Constructs a TestFailure with the given test and exception.

CppUnit::TestFailure::~TestFailure   [virtual]
 

Deletes the owned exception.

CppUnit::TestFailure::TestFailure const TestFailure &    other [private]
 


Member Function Documentation

TestFailure * CppUnit::TestFailure::clone   const [virtual]
 

Test * CppUnit::TestFailure::failedTest   const [virtual]
 

Gets the failed test.

std::string CppUnit::TestFailure::failedTestName   const [virtual]
 

Gets the name of the failed test.

bool CppUnit::TestFailure::isError   const [virtual]
 

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

TestFailure& CppUnit::TestFailure::operator= const TestFailure &    other [private]
 

SourceLine CppUnit::TestFailure::sourceLine   const [virtual]
 

Gets the failure location.

Exception * CppUnit::TestFailure::thrownException   const [virtual]
 

Gets the thrown exception. Never NULL.

std::string CppUnit::TestFailure::toString   const [virtual]
 

Returns a short description of the failure.


Member Data Documentation

Test* CppUnit::TestFailure::m_failedTest [protected]
 

bool CppUnit::TestFailure::m_isError [protected]
 

Exception* CppUnit::TestFailure::m_thrownException [protected]
 


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