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

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

Issue 861623002: Add a pretty printer to improve the error message non-function calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment 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 | « src/runtime/runtime-internal.cc ('k') | test/mozilla/mozilla.status » ('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 dbf1493034d469f726229e160fb6a090e6f4985b..0b9dedaf96b4e94b0b53c0a4f3b8afb6c1506412 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -11353,7 +11353,7 @@ THREADED_TEST(ConstructorForObject) {
value = CompileRun("new obj2(28)");
CHECK(try_catch.HasCaught());
String::Utf8Value exception_value1(try_catch.Exception());
- CHECK_EQ("TypeError: object is not a function", *exception_value1);
+ CHECK_EQ("TypeError: obj2 is not a function", *exception_value1);
try_catch.Reset();
Local<Value> args[] = { v8_num(29) };
@@ -11714,8 +11714,7 @@ THREADED_TEST(CallAsFunction) {
CHECK(try_catch.HasCaught());
String::Utf8Value exception_value1(try_catch.Exception());
// TODO(verwaest): Better message
- CHECK_EQ("TypeError: object is not a function",
- *exception_value1);
+ CHECK_EQ("TypeError: obj2 is not a function", *exception_value1);
try_catch.Reset();
// Call an object without call-as-function handler through the API
@@ -13095,7 +13094,7 @@ THREADED_PROFILED_TEST(InterceptorCallICFastApi_SimpleSignature_Miss3) {
"}");
CHECK(try_catch.HasCaught());
// TODO(verwaest): Adjust message.
- CHECK_EQ(v8_str("TypeError: undefined is not a function"),
+ CHECK_EQ(v8_str("TypeError: receiver.method is not a function"),
try_catch.Exception()->ToString(isolate));
CHECK_EQ(42, context->Global()->Get(v8_str("saved_result"))->Int32Value());
CHECK_GE(interceptor_call_count, 50);
@@ -13270,7 +13269,7 @@ THREADED_PROFILED_TEST(CallICFastApi_SimpleSignature_Miss2) {
"}");
CHECK(try_catch.HasCaught());
// TODO(verwaest): Adjust message.
- CHECK_EQ(v8_str("TypeError: undefined is not a function"),
+ CHECK_EQ(v8_str("TypeError: receiver.method is not a function"),
try_catch.Exception()->ToString(isolate));
CHECK_EQ(42, context->Global()->Get(v8_str("saved_result"))->Int32Value());
}
« no previous file with comments | « src/runtime/runtime-internal.cc ('k') | test/mozilla/mozilla.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698