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

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

Issue 923443003: new classes: no longer experimental. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « test/mjsunit/harmony/classes-experimental.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/super.js
diff --git a/test/mjsunit/harmony/super.js b/test/mjsunit/harmony/super.js
index ddc29d216b900fe0ef4db8f1b118e6a664447c91..11932e8b391744fa9d6347dc8138ac34395c83eb 100644
--- a/test/mjsunit/harmony/super.js
+++ b/test/mjsunit/harmony/super.js
@@ -1818,23 +1818,13 @@
assertEquals("base", d.fromBase);
assertEquals("derived", d.fromDerived);
- class ImplicitSubclassOfFunction {
- constructor() {
- super();
- this.x = 123;
- }
- }
-
- var o = new ImplicitSubclassOfFunction();
- assertEquals(123, o.x);
-
var calls = 0;
class G {
constructor() {
calls++;
}
}
- class F {
+ class F extends Object {
constructor() {
super();
}
@@ -1850,7 +1840,7 @@
(function TestSuperCallErrorCases() {
'use strict';
- class T {
+ class T extends Object {
constructor() {
super();
}
@@ -1859,73 +1849,3 @@
T.__proto__ = null;
assertThrows(function() { new T(); }, TypeError);
}());
-
-
-(function TestSuperCallSyntacticRestriction() {
Dmitry Lomov (no reviews) 2015/02/12 16:25:25 These tests are a duplicate of tests in 'classes.j
- 'use strict';
- assertThrows(function() {
- class C {
- constructor() {
- super(this.x);
- }
- }
- new C();
- }, TypeError);
- assertThrows(function() {
- class C {
- constructor() {
- super(this);
- }
- }
- new C();
- }, TypeError);
- assertThrows(function() {
- class C {
- constructor() {
- super(1, 2, Object.getPrototypeOf(this));
- }
- }
- new C();
- }, TypeError);
- assertThrows(function() {
- class C {
- constructor() {
- { super(1, 2); }
- }
- }
- new C();
- }, TypeError);
- assertThrows(function() {
- class C {
- constructor() {
- if (1) super();
- }
- }
- new C();
- }, TypeError);
-
- class C1 {
- constructor() {
- 'use strict';
- super();
- }
- }
- new C1();
-
- class C2 {
- constructor() {
- ; 'use strict';;;;;
- super();
- }
- }
- new C2();
-
- class C3 {
- constructor() {
- ; 'use strict';;;;;
- // This is a comment.
- super();
- }
- }
- new C3();
-}());
« no previous file with comments | « test/mjsunit/harmony/classes-experimental.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698