CPUnit 0.7 (beta)
The REAL C++ port of JUnit.
|
Thrown when an assert fails, or if someone calls unittest::fail(). More...
#include <unittest_AssertionException.hpp>
Public Member Functions | |
AssertionException (const std::string m) throw () | |
virtual | ~AssertionException () throw () |
virtual const char * | what () const throw () |
Long message. | |
virtual const char * | get_message () const throw () |
Short message. | |
virtual void | set_test (const RegInfo &t) throw () |
Registers test data. | |
Private Attributes | |
const RegInfo * | test |
Thrown when an assert fails, or if someone calls unittest::fail().
Definition at line 46 of file unittest_AssertionException.hpp.
unittest::AssertionException::AssertionException | ( | const std::string | m | ) | throw () |
m | The exception message. |
Definition at line 38 of file unittest_AssertionException.cpp.
unittest::AssertionException::~AssertionException | ( | ) | throw () [virtual] |
Definition at line 42 of file unittest_AssertionException.cpp.
const char * unittest::AssertionException::get_message | ( | ) | const throw () [virtual] |
Short message.
Definition at line 67 of file unittest_AssertionException.cpp.
void unittest::AssertionException::set_test | ( | const RegInfo & | t | ) | throw () [virtual] |
Registers test data.
This method can be called to set the test data before propagating the exception out to the main method.
t | The RegInfo for the test that has failed. |
Definition at line 77 of file unittest_AssertionException.cpp.
const char * unittest::AssertionException::what | ( | ) | const throw () [virtual] |
Long message.
In particular, the returned string contains both the exception message and data from the possibly contained RegInfo.
Reimplemented from unittest::UnitTestException.
Definition at line 51 of file unittest_AssertionException.cpp.
const RegInfo* unittest::AssertionException::test [private] |
Definition at line 47 of file unittest_AssertionException.hpp.