diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc index acc47b9c76..9d05c0f795 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 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 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); diff --git a/test/cctest/test-conversions.cc b/test/cctest/test-conversions.cc index 4815b1b6d3..651dc59d58 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)); diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc index 9aa839be6c..c0bd08af16 100644 --- a/test/cctest/test-heap.cc +++ b/test/cctest/test-heap.cc @@ -199,7 +199,7 @@ TEST(HeapObjects) { // nan oddball checks CHECK(heap->nan_value()->IsNumber()); - CHECK(isnan(heap->nan_value()->Number())); + CHECK(std::isnan(heap->nan_value()->Number())); Handle s = FACTORY->NewStringFromAscii(CStrVector("fisk hest ")); CHECK(s->IsString()); diff --git a/test/cctest/test-log.cc b/test/cctest/test-log.cc index 24e5db9338..89b11c9d86 100644 --- a/test/cctest/test-log.cc +++ b/test/cctest/test-log.cc @@ -28,10 +28,10 @@ // Tests of logging functions from log.h #ifdef __linux__ -#include #include #include #include +#include #endif // __linux__ #include "v8.h"