From e04d66bdd825309bc0658e60a54c9e444e2501f5 Mon Sep 17 00:00:00 2001 From: Milo Yip Date: Fri, 10 Apr 2015 23:47:53 +0800 Subject: [PATCH] Try to use EXPECT_NEAR --- test/unittest/readertest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unittest/readertest.cpp b/test/unittest/readertest.cpp index 6667ffc..d41eed6 100644 --- a/test/unittest/readertest.cpp +++ b/test/unittest/readertest.cpp @@ -191,7 +191,7 @@ static void TestParseDouble() { internal::Double e(x), a(h.actual_); \ EXPECT_EQ(e.Sign(), a.Sign()); \ if (fullPrecision) { \ - EXPECT_EQ(x, h.actual_); \ + EXPECT_NEAR(x, h.actual_, 0.0); \ if (x != h.actual_) \ printf(" String: %s\n Actual: %.17g\nExpected: %.17g\n", str, h.actual_, x); \ } \