|
Jon Test
C++ Unit Test Tool. Not for production -- sample code only
|
Exception thrown when a test fails an assert and should fail (unless wrapped in expectedFailure()). More...
#include <TestFailure.h>


Public Member Functions | |
| TestFailure (const char *const file, const int line, const std::string &message) | |
| Construct Test Failure Exception without excpression or operator information. | |
| template<typename Type1 , typename Type2 > | |
| TestFailure (const char *const file, const int line, const std::string &message, const std::string &firstExpression, const Type1 &firstValue, const std::string &secondExpression, const Type2 &secondValue, const std::string &operatorString) | |
| Construct Test Failure Exception. | |
| virtual | ~TestFailure () |
| Required virutal destructor. | |
| virtual const char * | what () const noexcept |
| Gets formatted message of string. | |
Public Attributes | |
| std::string | file |
| Filename where failure occurred. | |
| int | line |
| Line number of file where failure occurred. | |
| std::string | message |
| Message provided where failure occurred. | |
| std::string | firstExpression |
| String representation of first expression that failed the test. | |
| std::string | firstValue |
| String representation of evaluation of first expression that failed the test. | |
| std::string | secondExpression |
| String representation of second expression that failed the test. | |
| std::string | secondValue |
| String representation of evaluation of second expression that failed the test. | |
| std::string | operatorString |
| String representation of operator that failed the test. | |
| std::string | whatString |
| Formatted representation of failure. | |
Exception thrown when a test fails an assert and should fail (unless wrapped in expectedFailure()).
Contains all test data from failure.
Definition at line 15 of file TestFailure.h.
|
inline |
Construct Test Failure Exception without excpression or operator information.
| file | Filename where failure occurred |
| line | Line number of file where failure occurred |
| message | Message provided where failure occurred |
Definition at line 48 of file TestFailure.h.
|
inline |
Construct Test Failure Exception.
| Type1 | Type which first expression evaluated to |
| Type2 | Type which second expression evaluated to |
| file | Filename where failure occurred |
| line | Line number of file where failure occurred |
| message | Message provided where failure occurred |
| firstExpression | String representation of first expression that failed the test |
| firstValue | Evaluation of the first expression that failed the test |
| secondExpression | String representation of evaluation of second expression that failed the test |
| secondValue | Evaluation of the second expression that failed the test |
| operatorString | /// String representation of operator that failed the test |
Definition at line 75 of file TestFailure.h.
|
virtual |
Required virutal destructor.
Definition at line 6 of file TestFailure.cpp.
Gets formatted message of string.
Definition at line 11 of file TestFailure.cpp.
| std::string JonTest::TestFailure::file |
Filename where failure occurred.
Definition at line 20 of file TestFailure.h.
| std::string JonTest::TestFailure::firstExpression |
String representation of first expression that failed the test.
Definition at line 29 of file TestFailure.h.
| std::string JonTest::TestFailure::firstValue |
String representation of evaluation of first expression that failed the test.
Definition at line 32 of file TestFailure.h.
| int JonTest::TestFailure::line |
Line number of file where failure occurred.
Definition at line 23 of file TestFailure.h.
| std::string JonTest::TestFailure::message |
Message provided where failure occurred.
Definition at line 26 of file TestFailure.h.
| std::string JonTest::TestFailure::operatorString |
String representation of operator that failed the test.
Definition at line 41 of file TestFailure.h.
| std::string JonTest::TestFailure::secondExpression |
String representation of second expression that failed the test.
Definition at line 35 of file TestFailure.h.
| std::string JonTest::TestFailure::secondValue |
String representation of evaluation of second expression that failed the test.
Definition at line 38 of file TestFailure.h.
| std::string JonTest::TestFailure::whatString |
Formatted representation of failure.
Definition at line 44 of file TestFailure.h.