Index: test/cctest/cctest.h |
diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h |
index a0bc09d95062cbbc9a8b12799b4fb37a2106acf5..9798dfbc3c14612d05b30cb2276903bebb3b285b 100644 |
--- a/test/cctest/cctest.h |
+++ b/test/cctest/cctest.h |
@@ -530,6 +530,13 @@ static inline void DisableInlineAllocationSteps(v8::internal::NewSpace* space) { |
} |
+static inline void CheckDoubleEquals(double expected, double actual) { |
+ const double kEpsilon = 1e-10; |
+ CHECK_LE(expected, actual + kEpsilon); |
+ CHECK_GE(expected, actual - kEpsilon); |
+} |
+ |
+ |
static int LenFromSize(int size) { |
return (size - i::FixedArray::kHeaderSize) / i::kPointerSize; |
} |