Update ExpectArraysClose to use ExpectClose instead of EXPECT_NEAR The documentation for ExpectArraysClose and its implementation did not match. This change makes the polynomial_test not fail on 64bit AMD builds. Thanks to Phillip Huebner for reporting this. Change-Id: I503f2d3317a28d5885a34f8bdbccd49d20ae9ba2
diff --git a/internal/ceres/test_util.cc b/internal/ceres/test_util.cc index 5edd4fc..3866eb5 100644 --- a/internal/ceres/test_util.cc +++ b/internal/ceres/test_util.cc
@@ -117,7 +117,10 @@ CHECK(q); for (int i = 0; i < n; ++i) { - EXPECT_NEAR(p[i], q[i], tol) << "i=" << i; + EXPECT_TRUE(ExpectClose(p[i], q[i], tol)) + << "p[" << i << "]" << p[i] << " " + << "q[" << i << "]" << q[i] << " " + << "tol: " << tol; } }