58 ::testing::AssertionResult
operator()(
const char* expr1,
const char* expr2, T1 val1, T2 val2)
60 if (val1.isApprox(val2,
prec_))
61 return ::testing::AssertionSuccess();
63 std::stringstream msg;
64 msg <<
"Expected equality of these values (up to precision " <<
prec_ <<
"):" << std::fixed
65 << std::setprecision(1 - std::log10(
prec_))
66 <<
"\n " << expr1 <<
"\n Which is: " << val1
67 <<
"\n " << expr2 <<
"\n Which is: " << val2;
68 return ::testing::AssertionFailure() << msg.str();