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

Unified Diff: test/mjsunit/error-tostring-omit.js

Issue 271733005: Shorten autogenerated error message for functions only. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 years, 7 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/messages.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/error-tostring-omit.js
diff --git a/test/mjsunit/error-tostring-omit.js b/test/mjsunit/error-tostring-omit.js
index 111adfc212184c1c2157ee0c35a5c19cd9a5de21..9ff43fa9b2e521c51ce887f6eac184df84e2efe2 100644
--- a/test/mjsunit/error-tostring-omit.js
+++ b/test/mjsunit/error-tostring-omit.js
@@ -37,23 +37,15 @@ function veryLongString() {
"Nam accumsan dignissim turpis a turpis duis.";
}
+assertTrue(veryLongString().length > 256);
-var re = /omitted/;
+var re = /...<omitted>.../;
try {
- veryLongString.nonexistentMethod();
+ Number.prototype.toFixed.call(veryLongString);
} catch (e) {
- assertTrue(e.message.length < 350);
- // TODO(verwaest): Proper error message.
- // assertTrue(re.test(e.message));
-}
-
-try {
- veryLongString().nonexistentMethod();
-} catch (e) {
- assertTrue(e.message.length < 350);
- // TODO(verwaest): Proper error message.
- // assertTrue(re.test(e.message));
+ assertTrue(e.message.length < 256);
+ assertTrue(re.test(e.message));
}
try {
« no previous file with comments | « src/messages.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698