|
CPUnit 0.95 (beta)
The REAL C++ port of JUnit.
|
Thrown when an assert fails, or if someone calls cpunit::fail(). More...
#include <cpunit_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 Member Functions | |
| void | generate_what_msg () |
Private Attributes | |
| const RegInfo * | test |
| std::string | what_msg |
Thrown when an assert fails, or if someone calls cpunit::fail().
Definition at line 46 of file cpunit_AssertionException.hpp.
| cpunit::AssertionException::AssertionException | ( | const std::string & | m | ) | throw () |
| m | The exception message. |
Definition at line 38 of file cpunit_AssertionException.cpp.
| cpunit::AssertionException::~AssertionException | ( | ) | throw () [virtual] |
Definition at line 46 of file cpunit_AssertionException.cpp.
| void cpunit::AssertionException::generate_what_msg | ( | ) | [private] |
Definition at line 78 of file cpunit_AssertionException.cpp.
| const char * cpunit::AssertionException::get_message | ( | ) | const throw () [virtual] |
Short message.
Definition at line 63 of file cpunit_AssertionException.cpp.
| void cpunit::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 73 of file cpunit_AssertionException.cpp.
| const char * cpunit::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 cpunit::CPUnitException.
Definition at line 55 of file cpunit_AssertionException.cpp.
const RegInfo* cpunit::AssertionException::test [private] |
Definition at line 47 of file cpunit_AssertionException.hpp.
std::string cpunit::AssertionException::what_msg [private] |
Definition at line 48 of file cpunit_AssertionException.hpp.