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

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

Issue 14328044: Update tests to use std::isnan instead of isnan (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 months 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-api.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-conversions.cc
diff --git a/test/cctest/test-conversions.cc b/test/cctest/test-conversions.cc
index 4815b1b6d3798975641fac76ad8393406d5c6adb..651dc59d5845f308e3eb5219872e06e4907c6276 100644
--- a/test/cctest/test-conversions.cc
+++ b/test/cctest/test-conversions.cc
@@ -81,10 +81,10 @@ TEST(MalformedOctal) {
CHECK_EQ(81.0, StringToDouble(&uc, "081", ALLOW_HEX | ALLOW_OCTALS));
CHECK_EQ(78.0, StringToDouble(&uc, "078", ALLOW_HEX | ALLOW_OCTALS));
- CHECK(isnan(StringToDouble(&uc, "07.7", ALLOW_HEX | ALLOW_OCTALS)));
- CHECK(isnan(StringToDouble(&uc, "07.8", ALLOW_HEX | ALLOW_OCTALS)));
- CHECK(isnan(StringToDouble(&uc, "07e8", ALLOW_HEX | ALLOW_OCTALS)));
- CHECK(isnan(StringToDouble(&uc, "07e7", ALLOW_HEX | ALLOW_OCTALS)));
+ CHECK(std::isnan(StringToDouble(&uc, "07.7", ALLOW_HEX | ALLOW_OCTALS)));
+ CHECK(std::isnan(StringToDouble(&uc, "07.8", ALLOW_HEX | ALLOW_OCTALS)));
+ CHECK(std::isnan(StringToDouble(&uc, "07e8", ALLOW_HEX | ALLOW_OCTALS)));
+ CHECK(std::isnan(StringToDouble(&uc, "07e7", ALLOW_HEX | ALLOW_OCTALS)));
CHECK_EQ(8.7, StringToDouble(&uc, "08.7", ALLOW_HEX | ALLOW_OCTALS));
CHECK_EQ(8e7, StringToDouble(&uc, "08e7", ALLOW_HEX | ALLOW_OCTALS));
@@ -123,9 +123,9 @@ TEST(TrailingJunk) {
TEST(NonStrDecimalLiteral) {
UnicodeCache uc;
- CHECK(isnan(StringToDouble(&uc, " ", NO_FLAGS, OS::nan_value())));
- CHECK(isnan(StringToDouble(&uc, "", NO_FLAGS, OS::nan_value())));
- CHECK(isnan(StringToDouble(&uc, " ", NO_FLAGS, OS::nan_value())));
+ CHECK(std::isnan(StringToDouble(&uc, " ", NO_FLAGS, OS::nan_value())));
+ CHECK(std::isnan(StringToDouble(&uc, "", NO_FLAGS, OS::nan_value())));
+ CHECK(std::isnan(StringToDouble(&uc, " ", NO_FLAGS, OS::nan_value())));
CHECK_EQ(0.0, StringToDouble(&uc, "", NO_FLAGS));
CHECK_EQ(0.0, StringToDouble(&uc, " ", NO_FLAGS));
}
@@ -140,8 +140,8 @@ TEST(IntegerStrLiteral) {
CHECK_EQ(-1.0, StringToDouble(&uc, "-1", NO_FLAGS));
CHECK_EQ(-1.0, StringToDouble(&uc, " -1 ", NO_FLAGS));
CHECK_EQ(1.0, StringToDouble(&uc, " +1 ", NO_FLAGS));
- CHECK(isnan(StringToDouble(&uc, " - 1 ", NO_FLAGS)));
- CHECK(isnan(StringToDouble(&uc, " + 1 ", NO_FLAGS)));
+ CHECK(std::isnan(StringToDouble(&uc, " - 1 ", NO_FLAGS)));
+ CHECK(std::isnan(StringToDouble(&uc, " + 1 ", NO_FLAGS)));
CHECK_EQ(0.0, StringToDouble(&uc, "0e0", ALLOW_HEX | ALLOW_OCTALS));
CHECK_EQ(0.0, StringToDouble(&uc, "0e1", ALLOW_HEX | ALLOW_OCTALS));
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698