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

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

Issue 864803002: Remove deprecated v8::base::OS::nan_value(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix invalid test expectation. Created 5 years, 11 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/compiler/value-helper.h ('k') | test/cctest/test-assembler-ia32.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 31a83f3e435e19b0c255cc95edf1523574734ffe..4c7370779308d2486ca46603bec54a38c59fdea0 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -5844,7 +5844,7 @@ THREADED_TEST(Equality) {
CHECK(v8_num(1)->StrictEquals(v8_num(1)));
CHECK(!v8_num(1)->StrictEquals(v8_num(2)));
CHECK(v8_num(0.0)->StrictEquals(v8_num(-0.0)));
- Local<Value> not_a_number = v8_num(v8::base::OS::nan_value());
+ Local<Value> not_a_number = v8_num(std::numeric_limits<double>::quiet_NaN());
CHECK(!not_a_number->StrictEquals(not_a_number));
CHECK(v8::False(isolate)->StrictEquals(v8::False(isolate)));
CHECK(!v8::False(isolate)->StrictEquals(v8::Undefined(isolate)));
@@ -16972,10 +16972,8 @@ static void ObjectWithExternalArrayTestHelper(
CHECK_EQ(0, result->Int32Value());
if (array_type == v8::kExternalFloat64Array ||
array_type == v8::kExternalFloat32Array) {
- CHECK_EQ(static_cast<int>(v8::base::OS::nan_value()),
- static_cast<int>(
- i::Object::GetElement(
- isolate, jsobj, 7).ToHandleChecked()->Number()));
+ CHECK(std::isnan(
+ i::Object::GetElement(isolate, jsobj, 7).ToHandleChecked()->Number()));
} else {
CheckElementValue(isolate, 0, jsobj, 7);
}
@@ -19089,7 +19087,7 @@ static uint64_t DoubleToBits(double value) {
static double DoubleToDateTime(double input) {
double date_limit = 864e13;
if (std::isnan(input) || input < -date_limit || input > date_limit) {
- return v8::base::OS::nan_value();
+ return std::numeric_limits<double>::quiet_NaN();
}
return (input < 0) ? -(std::floor(-input)) : std::floor(input);
}
« no previous file with comments | « test/cctest/compiler/value-helper.h ('k') | test/cctest/test-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698