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

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

Issue 20992005: Prepare some ValueOf renamings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added comments Created 7 years, 5 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 | « src/api.cc ('k') | no next file » | 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 e25642ed948b054c63f0c205467930d786fe982a..3c6f85ed72a0cc95f77754a3f850b2727c381b43 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -1488,13 +1488,13 @@ THREADED_TEST(StringObject) {
CHECK(!not_object->IsStringObject());
v8::Handle<v8::StringObject> as_boxed = boxed_string.As<v8::StringObject>();
CHECK(!as_boxed.IsEmpty());
- Local<v8::String> the_string = as_boxed->StringValue();
+ Local<v8::String> the_string = as_boxed->ValueOf();
CHECK(!the_string.IsEmpty());
ExpectObject("\"test\"", the_string);
v8::Handle<v8::Value> new_boxed_string = v8::StringObject::New(the_string);
CHECK(new_boxed_string->IsStringObject());
as_boxed = new_boxed_string.As<v8::StringObject>();
- the_string = as_boxed->StringValue();
+ the_string = as_boxed->ValueOf();
CHECK(!the_string.IsEmpty());
ExpectObject("\"test\"", the_string);
}
@@ -1511,12 +1511,12 @@ THREADED_TEST(NumberObject) {
CHECK(!boxed_not_number->IsNumberObject());
v8::Handle<v8::NumberObject> as_boxed = boxed_number.As<v8::NumberObject>();
CHECK(!as_boxed.IsEmpty());
- double the_number = as_boxed->NumberValue();
+ double the_number = as_boxed->ValueOf();
CHECK_EQ(42.0, the_number);
v8::Handle<v8::Value> new_boxed_number = v8::NumberObject::New(43);
CHECK(new_boxed_number->IsNumberObject());
as_boxed = new_boxed_number.As<v8::NumberObject>();
- the_number = as_boxed->NumberValue();
+ the_number = as_boxed->ValueOf();
CHECK_EQ(43.0, the_number);
}
@@ -1533,16 +1533,16 @@ THREADED_TEST(BooleanObject) {
v8::Handle<v8::BooleanObject> as_boxed =
boxed_boolean.As<v8::BooleanObject>();
CHECK(!as_boxed.IsEmpty());
- bool the_boolean = as_boxed->BooleanValue();
+ bool the_boolean = as_boxed->ValueOf();
CHECK_EQ(true, the_boolean);
v8::Handle<v8::Value> boxed_true = v8::BooleanObject::New(true);
v8::Handle<v8::Value> boxed_false = v8::BooleanObject::New(false);
CHECK(boxed_true->IsBooleanObject());
CHECK(boxed_false->IsBooleanObject());
as_boxed = boxed_true.As<v8::BooleanObject>();
- CHECK_EQ(true, as_boxed->BooleanValue());
+ CHECK_EQ(true, as_boxed->ValueOf());
as_boxed = boxed_false.As<v8::BooleanObject>();
- CHECK_EQ(false, as_boxed->BooleanValue());
+ CHECK_EQ(false, as_boxed->ValueOf());
}
@@ -1567,7 +1567,9 @@ THREADED_TEST(PrimitiveAndWrappedBooleans) {
Local<BooleanObject> false_boolean_object = false_value.As<BooleanObject>();
CHECK(!false_boolean_object->IsBoolean());
CHECK(false_boolean_object->IsBooleanObject());
- CHECK(!false_boolean_object->BooleanValue());
+ // TODO(svenpanne) Uncomment when BooleanObject::BooleanValue() is deleted.
+ // CHECK(false_boolean_object->BooleanValue());
+ CHECK(!false_boolean_object->ValueOf());
CHECK(!false_boolean_object->IsTrue());
CHECK(!false_boolean_object->IsFalse());
@@ -1588,7 +1590,9 @@ THREADED_TEST(PrimitiveAndWrappedBooleans) {
Local<BooleanObject> true_boolean_object = true_value.As<BooleanObject>();
CHECK(!true_boolean_object->IsBoolean());
CHECK(true_boolean_object->IsBooleanObject());
- CHECK(true_boolean_object->BooleanValue());
+ // TODO(svenpanne) Uncomment when BooleanObject::BooleanValue() is deleted.
+ // CHECK(true_boolean_object->BooleanValue());
+ CHECK(true_boolean_object->ValueOf());
CHECK(!true_boolean_object->IsTrue());
CHECK(!true_boolean_object->IsFalse());
}
@@ -2616,7 +2620,7 @@ THREADED_TEST(SymbolProperties) {
CHECK(sym_obj->Equals(sym2));
CHECK(!sym_obj->StrictEquals(sym2));
CHECK(v8::SymbolObject::Cast(*sym_obj)->Equals(sym_obj));
- CHECK(v8::SymbolObject::Cast(*sym_obj)->SymbolValue()->Equals(sym2));
+ CHECK(v8::SymbolObject::Cast(*sym_obj)->ValueOf()->Equals(sym2));
// Make sure delete of a non-existent symbol property works.
CHECK(obj->Delete(sym1));
@@ -13224,7 +13228,7 @@ THREADED_TEST(DateAccess) {
v8::HandleScope scope(context->GetIsolate());
v8::Handle<v8::Value> date = v8::Date::New(1224744689038.0);
CHECK(date->IsDate());
- CHECK_EQ(1224744689038.0, date.As<v8::Date>()->NumberValue());
+ CHECK_EQ(1224744689038.0, date.As<v8::Date>()->ValueOf());
}
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698