| CppUnit project page | FAQ | CppUnit home page |
#include <AdditionalMessage.h>
Inheritance diagram for AdditionalMessage:


Public Types | |
| typedef Message | SuperClass |
Public Methods | |
| AdditionalMessage () | |
| Constructs an empty Message. More... | |
| AdditionalMessage (const std::string &detail1) | |
| Constructs a Message with the specified detail string. More... | |
| AdditionalMessage (const char *detail1) | |
| Constructs a Message with the specified detail string. More... | |
| AdditionalMessage (const Message &other) | |
| Constructs a copy of the specified message. More... | |
| AdditionalMessage & | operator= (const Message &other) |
| Assignment operator. More... | |
Provides a implicit constructor that takes a single string. This allow this class to be used as the message arguments in macros.
The constructed object is either a Message with a single detail string if a string was passed to the macro, or a copy of the Message passed to the macro.
Here is an example of usage:
void checkStringEquals( const std::string &expected,
const std::string &actual,
const CppUnit::SourceLine &sourceLine,
const CppUnit::AdditionalMessage &message );
#define XTLUT_ASSERT_STRING_EQUAL_MESSAGE( expected, actual, message ) \
::XtlUt::Impl::checkStringEquals( ::Xtl::toString(expected), \
::Xtl::toString(actual), \
CPPUNIT_SOURCELINE(), \
message )
In the previous example, the user can specify a simple string for message, or a complex Message object.
|
|
|
|
|
Constructs an empty Message.
|
|
|
Constructs a Message with the specified detail string.
|
|
|
Constructs a Message with the specified detail string.
|
|
|
Constructs a copy of the specified message.
|
|
|
Assignment operator.
|
|
|
hosts this site. |
Send comments to: CppUnit Developers |