Index: test/cctest/compiler/value-helper.h |
diff --git a/test/cctest/compiler/value-helper.h b/test/cctest/compiler/value-helper.h |
index 83cd33c5b0af90290fcb6ba0e9d08412f00b7aed..1ba83dd9ec4d1f8b49bfb5dacc499f1cf0e19363 100644 |
--- a/test/cctest/compiler/value-helper.h |
+++ b/test/cctest/compiler/value-helper.h |
@@ -321,6 +321,10 @@ static inline void CheckFloatEq(volatile float x, volatile float y) { |
} |
} |
+#define CHECK_FLOAT_EQ(lhs, rhs) \ |
titzer
2016/03/07 10:38:11
You should use a do { .. } while(false) to be a go
|
+ volatile float tmp = lhs; \ |
+ CheckFloatEq(tmp, rhs); |
+ |
static inline void CheckDoubleEq(volatile double x, volatile double y) { |
if (std::isnan(x)) { |
CHECK(std::isnan(y)); |
@@ -329,6 +333,10 @@ static inline void CheckDoubleEq(volatile double x, volatile double y) { |
} |
} |
+#define CHECK_DOUBLE_EQ(lhs, rhs) \ |
+ volatile double tmp = lhs; \ |
+ CheckDoubleEq(tmp, rhs); |
+ |
} // namespace compiler |
} // namespace internal |
} // namespace v8 |