|
Public Member Functions |
| Message () |
| Message (const Message &other) |
| Message (const std::string &shortDescription) |
| Message (const std::string &shortDescription, const std::string &detail1) |
| Message (const std::string &shortDescription, const std::string &detail1, const std::string &detail2) |
| Message (const std::string &shortDescription, const std::string &detail1, const std::string &detail2, const std::string &detail3) |
Message & | operator= (const Message &other) |
const std::string & | shortDescription () const |
| Returns the short description.
|
int | detailCount () const |
| Returns the number of detail string.
|
std::string | detailAt (int index) const |
| Returns the detail at the specified index.
|
std::string | details () const |
| Returns a string that represents a list of the detail strings.
|
void | clearDetails () |
| Removes all detail strings.
|
void | addDetail (const std::string &detail) |
| Adds a single detail string.
|
void | addDetail (const std::string &detail1, const std::string &detail2) |
| Adds two detail strings.
|
void | addDetail (const std::string &detail1, const std::string &detail2, const std::string &detail3) |
| Adds three detail strings.
|
void | addDetail (const Message &message) |
| Adds the detail strings of the specified message.
|
void | setShortDescription (const std::string &shortDescription) |
| Sets the short description.
|
bool | operator== (const Message &other) const |
| Tests if a message is identical to another one.
|
bool | operator!= (const Message &other) const |
| Tests if a message is different from another one.
|
Private Types |
typedef CppUnitDeque< std::string > | Details |
Private Attributes |
std::string | m_shortDescription |
Details | m_details |
The short description is used to indicate how the detail strings should be interpreted. It usually indicates the failure types, such as "assertion failed", "forced failure", "unexpected exception caught", "equality assertion failed"... It should not contains new line character (
).
Detail strings are used to provide more information about the failure. It can contains the asserted expression, the expected and actual values in an equality assertion, some addional messages... Detail strings can contains new line characters (
).