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