Skip to content
Snippets Groups Projects
Commit 549b6e34 authored by Tomasz Bold's avatar Tomasz Bold
Browse files

Modified error messages to they look like compiler errors

parent 1585fa51
No related branches found
No related tags found
No related merge requests found
...@@ -36,14 +36,14 @@ namespace Athena_test { ...@@ -36,14 +36,14 @@ namespace Athena_test {
m_line(l) {} m_line(l) {}
void EXPECTED( const T& e ) { void EXPECTED( const T& e ) {
if ( not cmp_eq(e, m_value) ) { if ( not cmp_eq(e, m_value) ) {
std::cerr << m_file << ":" << m_line << " Test failed, " std::cerr << m_file << ":" << m_line << ": error: Test failed, "
<< "expected: " << e << " obtained: " << m_value << "\n"; << "expected: " << e << " obtained: " << m_value << "\n";
assert( cmp_eq(e, m_value) ); assert( cmp_eq(e, m_value) );
} }
} }
void NOT_EXPECTED( const T& e ) { void NOT_EXPECTED( const T& e ) {
if ( cmp_eq(e, m_value) ) { if ( cmp_eq(e, m_value) ) {
std::cerr << m_file << ":" << m_line << " Test failed, " std::cerr << m_file << ":" << m_line << ": error: Test failed, "
<< "NOT expected: " << e << " obtained: " << m_value << "\n"; << "NOT expected: " << e << " obtained: " << m_value << "\n";
assert( not cmp_eq(e, m_value) ); assert( not cmp_eq(e, m_value) );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment