OLD | NEW |
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 | |
6 | |
7 | 5 |
8 (function testReflectConstructArity() { | 6 (function testReflectConstructArity() { |
9 assertEquals(2, Reflect.construct.length); | 7 assertEquals(2, Reflect.construct.length); |
10 })(); | 8 })(); |
11 | 9 |
12 | 10 |
13 (function testReflectConstructNonConstructor() { | 11 (function testReflectConstructNonConstructor() { |
14 assertThrows(function() { | 12 assertThrows(function() { |
15 new Reflect.construct(function(){}, []); | 13 new Reflect.construct(function(){}, []); |
16 }, TypeError); | 14 }, TypeError); |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 for (var realm of [realm1, realm2]) { | 367 for (var realm of [realm1, realm2]) { |
370 test(realm, getname(intrinsic), getargs(intrinsic), convert); | 368 test(realm, getname(intrinsic), getargs(intrinsic), convert); |
371 } | 369 } |
372 } | 370 } |
373 } | 371 } |
374 | 372 |
375 test_all(test_intrinsic_default, (v)=>v); | 373 test_all(test_intrinsic_default, (v)=>v); |
376 test_all(test_intrinsic_default, | 374 test_all(test_intrinsic_default, |
377 (v)=>{ "use strict"; return class extends v {}}); | 375 (v)=>{ "use strict"; return class extends v {}}); |
378 })(); | 376 })(); |
OLD | NEW |