Made the output from g-test a bit more readable

This commit is contained in:
Jacob Støren committed 2016-10-17 15:15:27 +02:00
1 parent 6da4d7bb60
commit 323f7893cb
1 file changed
+5 -5
+5 -5
View File
@@ -2400,11 +2400,11 @@ AssertionResult DoubleNearPredFormat(const char* expr1,
// TODO(wan): do not print the value of an expression if it's // TODO(wan): do not print the value of an expression if it's
// already a literal. // already a literal.
Message msg; Message msg;
msg << "The difference between " << expr1 << " and " << expr2 msg << "\nThe difference between " << expr1 << " and " << expr2
<< " is " << diff << ", which exceeds " << abs_error_expr << ", where\n" << " is " << diff << ". It exceeds " << abs_error_expr << "\n"
<< expr1 << " evaluates to " << val1 << ",\n" << " Expected : " << val1 << " (" << expr1 << ")\n"
<< expr2 << " evaluates to " << val2 << ", and\n" << " Actual : " << val2 << " (" << expr2 << ")\n"
<< abs_error_expr << " evaluates to " << abs_error << "."; << " Tolerance: " << abs_error << " (" << abs_error_expr << ")" ;
return AssertionFailure(msg); return AssertionFailure(msg);
} }