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

Unified Diff: test/mjsunit/harmony/classes.js

Issue 624013005: Classes: Add support for toString (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add type checks Created 6 years, 2 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/classes.js
diff --git a/test/mjsunit/harmony/classes.js b/test/mjsunit/harmony/classes.js
index 7156dbdb8ef6c3c11b47ee13012af8e56ea589ca..a83d483bd9a20945d383f1bda233875fb87b748c 100644
--- a/test/mjsunit/harmony/classes.js
+++ b/test/mjsunit/harmony/classes.js
@@ -165,3 +165,15 @@
new C();
})();
*/
+
+
+(function TestToString() {
+ class C {}
+ assertEquals('class C {}', C.toString());
+
+ class D { constructor() { 42; } }
+ assertEquals('class D { constructor() { 42; } }', D.toString());
+
+ class E { x() { 42; } }
+ assertEquals('class E { x() { 42; } }', E.toString());
+})();
« 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