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

Unified Diff: test/mjsunit/harmony/generators-runtime.js

Issue 14912002: toString() on generator functions prints with function* (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Remove TODO Created 7 years, 8 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/v8natives.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/generators-runtime.js
diff --git a/test/mjsunit/harmony/generators-runtime.js b/test/mjsunit/harmony/generators-runtime.js
index 0182fc349bcc7e00eb0e6efd439b027caded759a..b4e8f950e1358898d31d16beddd6e36da9228a30 100644
--- a/test/mjsunit/harmony/generators-runtime.js
+++ b/test/mjsunit/harmony/generators-runtime.js
@@ -105,6 +105,8 @@ function TestGeneratorFunction() {
assertSame(Function, Object.getPrototypeOf(GeneratorFunction));
assertTrue(g instanceof Function);
+ assertEquals("function* g() { yield 1; }", g.toString());
+
// Not all functions are generators.
assertTrue(f instanceof Function); // Sanity check.
assertTrue(!(f instanceof GeneratorFunction));
« no previous file with comments | « src/v8natives.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698