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

Side by Side Diff: test/mjsunit/harmony/classes-experimental.js

Issue 923443003: new classes: no longer experimental. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: One more rebase? 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 unified diff | Download patch
« no previous file with comments | « test/mjsunit/harmony/classes.js ('k') | test/mjsunit/harmony/super.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Flags: --experimental-classes --harmony-classes 5 // Flags: --experimental-classes --harmony-classes
6 6
7 'use strict'; 7 'use strict';
8 (function TestArgumentsAccess() { 8 (function TestArgumentsAccess() {
9 class Base { 9 class Base {
10 constructor() { 10 constructor() {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 assertEquals(1, fCalled); 157 assertEquals(1, fCalled);
158 assertEquals(1, baseCalled); 158 assertEquals(1, baseCalled);
159 assertSame(obj, this); 159 assertSame(obj, this);
160 } 160 }
161 } 161 }
162 162
163 new Subclass1(); 163 new Subclass1();
164 }()); 164 }());
165 165
166 166
167 (function TestSuperInBaseConstructors() {
168 class Base {
169 constructor() {
170 let exn = null;
171 try {
172 super();
173 } catch (e) {
174 exn = e;
175 }
176 assertTrue(exn instanceof ReferenceError);
177 }
178 }
179
180 new Base();
181 }());
182
183
167 (function TestPrototypeWiring() { 184 (function TestPrototypeWiring() {
168 class Base { 185 class Base {
169 constructor(x) { 186 constructor(x) {
170 this.foobar = x; 187 this.foobar = x;
171 } 188 }
172 } 189 }
173 190
174 class Subclass extends Base { 191 class Subclass extends Base {
175 constructor(x) { 192 constructor(x) {
176 super(x); 193 super(x);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 var eua = new ExtendedUint8Array(10); 347 var eua = new ExtendedUint8Array(10);
331 assertEquals(10, eua.length); 348 assertEquals(10, eua.length);
332 assertEquals(10, eua.byteLength); 349 assertEquals(10, eua.byteLength);
333 eua[0] = 0xFF; 350 eua[0] = 0xFF;
334 eua[1] = 0xFFA; 351 eua[1] = 0xFFA;
335 assertEquals(0xFF, eua[0]); 352 assertEquals(0xFF, eua[0]);
336 assertEquals(0xFA, eua[1]); 353 assertEquals(0xFA, eua[1]);
337 assertSame(ExtendedUint8Array.prototype, eua.__proto__); 354 assertSame(ExtendedUint8Array.prototype, eua.__proto__);
338 assertEquals("[object Uint8Array]", Object.prototype.toString.call(eua)); 355 assertEquals("[object Uint8Array]", Object.prototype.toString.call(eua));
339 }()); 356 }());
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/classes.js ('k') | test/mjsunit/harmony/super.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698