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

Unified Diff: test/cctest/test-api.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 | « no previous file | test/cctest/test-conversions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index acc47b9c7663d3389004cc5c2212308cd063e493..9d05c0f795a55dc23fb0fe2ad780d90db863adc3 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -3344,7 +3344,7 @@ THREADED_TEST(ConversionException) {
CheckUncle(&try_catch);
double number_value = obj->NumberValue();
- CHECK_NE(0, isnan(number_value));
+ CHECK_NE(0, std::isnan(number_value));
CheckUncle(&try_catch);
int64_t integer_value = obj->IntegerValue();
@@ -15445,7 +15445,7 @@ static uint64_t DoubleToBits(double value) {
static double DoubleToDateTime(double input) {
double date_limit = 864e13;
- if (isnan(input) || input < -date_limit || input > date_limit) {
+ if (std::isnan(input) || input < -date_limit || input > date_limit) {
return i::OS::nan_value();
}
return (input < 0) ? -(floor(-input)) : floor(input);
@@ -15506,7 +15506,7 @@ THREADED_TEST(QuietSignalingNaNs) {
// Check that Number::New preserves non-NaNs and quiets SNaNs.
v8::Handle<v8::Value> number = v8::Number::New(test_value);
double stored_number = number->NumberValue();
- if (!isnan(test_value)) {
+ if (!std::isnan(test_value)) {
CHECK_EQ(test_value, stored_number);
} else {
uint64_t stored_bits = DoubleToBits(stored_number);
@@ -15525,7 +15525,7 @@ THREADED_TEST(QuietSignalingNaNs) {
v8::Handle<v8::Value> date = v8::Date::New(test_value);
double expected_stored_date = DoubleToDateTime(test_value);
double stored_date = date->NumberValue();
- if (!isnan(expected_stored_date)) {
+ if (!std::isnan(expected_stored_date)) {
CHECK_EQ(expected_stored_date, stored_date);
} else {
uint64_t stored_bits = DoubleToBits(stored_date);
« no previous file with comments | « no previous file | test/cctest/test-conversions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698