Files
haiku-beta6/headers/tools/cppunit/cppunit/TestFailure.h
T
Oliver Tappe 58481f0f6e * fix gcc4 build of cppunit library by explicitly spelling out std:: in
the headers and importing the required classes in the implementation files
* automatic whitespace cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30586 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-02 19:04:52 +00:00

60 lines
1.1 KiB
C++

#ifndef CPPUNIT_TESTFAILURE_H // -*- C++ -*-
#define CPPUNIT_TESTFAILURE_H
#include <cppunit/Portability.h>
#include <string>
namespace CppUnit {
class Exception;
class SourceLine;
class Test;
/*! \brief Record of a failed Test execution.
* \ingroup BrowsingCollectedTestResult
*
* A TestFailure collects a failed test together with
* the caught exception.
*
* TestFailure assumes lifetime control for any exception
* passed to it.
*/
class CPPUNIT_API TestFailure
{
public:
TestFailure( Test *failedTest,
Exception *thrownException,
bool isError );
virtual ~TestFailure ();
virtual Test *failedTest() const;
virtual Exception *thrownException() const;
virtual SourceLine sourceLine() const;
virtual bool isError() const;
virtual std::string failedTestName() const;
virtual std::string toString() const;
virtual TestFailure *clone() const;
protected:
Test *m_failedTest;
Exception *m_thrownException;
bool m_isError;
private:
TestFailure( const TestFailure &other );
TestFailure &operator =( const TestFailure& other );
};
} // namespace CppUnit
#endif // CPPUNIT_TESTFAILURE_H