Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1133)

Unified Diff: test/cctest/test-double.cc

Issue 813813003: Revert of Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-checks.cc ('k') | test/cctest/test-strtod.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-double.cc
diff --git a/test/cctest/test-double.cc b/test/cctest/test-double.cc
index 3ff263daca7f386a52cddd2218845b9cbb0a546a..16dcb37101ef6501db6252b79c799af1ad3da2e8 100644
--- a/test/cctest/test-double.cc
+++ b/test/cctest/test-double.cc
@@ -103,8 +103,8 @@
TEST(IsSpecial) {
- CHECK(Double(std::numeric_limits<double>::infinity()).IsSpecial());
- CHECK(Double(-std::numeric_limits<double>::infinity()).IsSpecial());
+ CHECK(Double(V8_INFINITY).IsSpecial());
+ CHECK(Double(-V8_INFINITY).IsSpecial());
CHECK(Double(v8::base::OS::nan_value()).IsSpecial());
uint64_t bits = V8_2PART_UINT64_C(0xFFF12345, 00000000);
CHECK(Double(bits).IsSpecial());
@@ -126,8 +126,8 @@
TEST(IsInfinite) {
- CHECK(Double(std::numeric_limits<double>::infinity()).IsInfinite());
- CHECK(Double(-std::numeric_limits<double>::infinity()).IsInfinite());
+ CHECK(Double(V8_INFINITY).IsInfinite());
+ CHECK(Double(-V8_INFINITY).IsInfinite());
CHECK(!Double(v8::base::OS::nan_value()).IsInfinite());
CHECK(!Double(0.0).IsInfinite());
CHECK(!Double(-0.0).IsInfinite());
@@ -140,8 +140,8 @@
TEST(Sign) {
CHECK_EQ(1, Double(1.0).Sign());
- CHECK_EQ(1, Double(std::numeric_limits<double>::infinity()).Sign());
- CHECK_EQ(-1, Double(-std::numeric_limits<double>::infinity()).Sign());
+ CHECK_EQ(1, Double(V8_INFINITY).Sign());
+ CHECK_EQ(-1, Double(-V8_INFINITY).Sign());
CHECK_EQ(1, Double(0.0).Sign());
CHECK_EQ(-1, Double(-0.0).Sign());
uint64_t min_double64 = V8_2PART_UINT64_C(0x00000000, 00000001);
@@ -225,8 +225,7 @@
CHECK_EQ(-0.0, d1.value());
CHECK_EQ(0.0, d2.value());
CHECK_EQ(4e-324, d2.NextDouble());
- CHECK_EQ(-1.7976931348623157e308,
- Double(-std::numeric_limits<double>::infinity()).NextDouble());
- CHECK_EQ(std::numeric_limits<double>::infinity(),
+ CHECK_EQ(-1.7976931348623157e308, Double(-V8_INFINITY).NextDouble());
+ CHECK_EQ(V8_INFINITY,
Double(V8_2PART_UINT64_C(0x7fefffff, ffffffff)).NextDouble());
}
« no previous file with comments | « test/cctest/test-checks.cc ('k') | test/cctest/test-strtod.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698