1#ifndef JON_TEST_TEST_FAILURE_H
2#define JON_TEST_TEST_FAILURE_H
16:
public std::exception
49 const char*
const file,
61 std::ostringstream out;
74 template<
typename Type1,
typename Type2>
76 const char*
const file,
93 std::ostringstream out;
95 this->firstValue = out.str();
99 std::ostringstream out;
101 this->secondValue = out.str();
105 std::ostringstream out;
107 if(!this->operatorString.empty()) {
121 virtual const char*
what() const noexcept;
Exception thrown when a test fails an assert and should fail (unless wrapped in expectedFailure()).
std::string file
Filename where failure occurred.
int line
Line number of file where failure occurred.
std::string whatString
Formatted representation of failure.
std::string operatorString
String representation of operator that failed the test.
std::string firstValue
String representation of evaluation of first expression that failed the test.
virtual ~TestFailure()
Required virutal destructor.
virtual const char * what() const noexcept
Gets formatted message of string.
std::string secondValue
String representation of evaluation of second expression that failed the test.
std::string message
Message provided where failure occurred.
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.
TestFailure(const char *const file, const int line, const std::string &message)
Construct Test Failure Exception without excpression or operator information.
std::string secondExpression
String representation of second expression that failed the test.
std::string firstExpression
String representation of first expression that failed the test.