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

Side by Side Diff: test/mjsunit/harmony/reflect-construct.js

Issue 1484473002: Fix Reflect.construct wrt proxy, generator, and non-subclass new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/es6/classes-proxy.js ('k') | no next file » | 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: --harmony-reflect 5 // Flags: --harmony-reflect
6 6
7 7
8 (function testReflectConstructArity() { 8 (function testReflectConstructArity() {
9 assertEquals(2, Reflect.construct.length); 9 assertEquals(2, Reflect.construct.length);
10 })(); 10 })();
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 ["T", "E", "S", "T", "!", "!"]).a); 268 ["T", "E", "S", "T", "!", "!"]).a);
269 assertEquals(10, Reflect.construct(sumStrict, 269 assertEquals(10, Reflect.construct(sumStrict,
270 { 0: 1, 1: 2, 2: 3, 3: 4, length: 4 }).a); 270 { 0: 1, 1: 2, 2: 3, 3: 4, length: 4 }).a);
271 assertEquals("TEST", Reflect.construct(sumSloppy, 271 assertEquals("TEST", Reflect.construct(sumSloppy,
272 ["T", "E", "S", "T"]).a); 272 ["T", "E", "S", "T"]).a);
273 assertEquals("TEST!!", Reflect.construct(sumSloppy, 273 assertEquals("TEST!!", Reflect.construct(sumSloppy,
274 ["T", "E", "S", "T", "!", "!"]).a); 274 ["T", "E", "S", "T", "!", "!"]).a);
275 assertEquals(10, Reflect.construct(sumSloppy, 275 assertEquals(10, Reflect.construct(sumSloppy,
276 { 0: 1, 1: 2, 2: 3, 3: 4, length: 4 }).a); 276 { 0: 1, 1: 2, 2: 3, 3: 4, length: 4 }).a);
277 })(); 277 })();
278
279 (function() {
280 function* f() { yield 1; yield 2; }
281 function* g() { yield 3; yield 4; }
282 var o = Reflect.construct(f, [], g);
283 assertEquals([1, 2], [...o]);
284 assertTrue(o.__proto__ === g.prototype);
285 assertTrue(o.__proto__ !== f.prototype);
286 })();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/classes-proxy.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698