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

Unified Diff: test/mjsunit/harmony/function-name.js

Issue 1712833002: Don't reflect ES2015 Function name inference in Function.prototype.toString (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move bits around to make STATIC_ASSERT happy Created 4 years, 10 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/parsing/preparser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/function-name.js
diff --git a/test/mjsunit/harmony/function-name.js b/test/mjsunit/harmony/function-name.js
index 5265c2d22a2fd6dd4b39e4c3a11e3058e1160bee..7bb1f6ae01e59c107e0f99ef8766ea3e5942016f 100644
--- a/test/mjsunit/harmony/function-name.js
+++ b/test/mjsunit/harmony/function-name.js
@@ -357,3 +357,17 @@
var obj = { ['foo']: factory() };
assertEquals('', obj.foo.name);
})();
+
+
+(function testNameNotReflectedInToString() {
+ var f = function() {};
+ var g = function*() {};
+ var obj = {
+ ['h']: function() {},
+ i: () => {}
+ };
+ assertEquals('function () {}', f.toString());
+ assertEquals('function* () {}', g.toString());
+ assertEquals('function () {}', obj.h.toString());
+ assertEquals('() => {}', obj.i.toString());
+})();
« no previous file with comments | « src/parsing/preparser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698