Simpatico
v1.10
|
An exception thrown by a failed unit test.
Definition at line 19 of file TestException.h.
#include <TestException.h>
Public Member Functions | |
TestException () | |
Default constructor. More... | |
TestException (const char *function, const char *message, const char *file, int line) | |
Constructor for throwing. More... | |
TestException (const char *message, const char *file, int line) | |
Constructor without function name parameter. More... | |
~TestException () | |
Destructor. More... | |
void | write (std::ostream &out) |
Write error message to output stream. More... | |
const std::string & | message () |
Return the error message. More... | |
Protected Attributes | |
std::string | message_ |
Error message. More... | |
TestException::TestException | ( | ) |
Default constructor.
Function Definitions ---------------------------------------—.
Definition at line 87 of file TestException.h.
TestException::TestException | ( | const char * | function, |
const char * | message, | ||
const char * | file, | ||
int | line | ||
) |
Constructor for throwing.
Constructs error message that includes file and line number. Values of the file and line parameters should be given by the built-in macros FILE and LINE, respectively, in the calling function. A typical call of the constructor is thus of the form:
function | name of the function from which the TestException was thrown |
message | message describing the nature of the error |
file | name of the file from which the TestException was thrown |
line | line number in file |
Definition at line 94 of file TestException.h.
References message_.
TestException::TestException | ( | const char * | message, |
const char * | file, | ||
int | line | ||
) |
Constructor without function name parameter.
message | message describing the nature of the error |
file | name of the file from which the TestException was thrown |
line | line number in file |
Definition at line 116 of file TestException.h.
References message_.
TestException::~TestException | ( | ) |
Destructor.
Definition at line 134 of file TestException.h.
|
inline |
Write error message to output stream.
out | output stream |
Definition at line 142 of file TestException.h.
References message_.
|
inline |
Return the error message.
Definition at line 148 of file TestException.h.
References message_.
Referenced by UnitTestRunner< UnitTestClass >::method().
|
protected |
Error message.
Definition at line 78 of file TestException.h.
Referenced by message(), TestException(), and write().