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 | 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 var well_known_intrinsic_constructors = [ | 292 var well_known_intrinsic_constructors = [ |
293 "Array", | 293 "Array", |
294 "ArrayBuffer", | 294 "ArrayBuffer", |
295 "Boolean", | 295 "Boolean", |
296 ["DataView", [new ArrayBuffer()]], | 296 ["DataView", [new ArrayBuffer()]], |
297 "Date", | 297 "Date", |
298 "Error", | 298 "Error", |
299 "EvalError", | 299 "EvalError", |
300 "Float32Array", | 300 "Float32Array", |
301 "Float64Array", | 301 "Float64Array", |
302 "Function", | 302 ["Function", ["return 153;"]], |
303 "((function*(){}).constructor)", // GeneratorFunction | 303 ["Function", ["'use strict'; return 153;"]], |
| 304 ["Function", ["'use strong'; return 153;"]], |
| 305 ["((function*(){}).constructor)", ["yield 153;"]], // GeneratorFunction |
| 306 ["((function*(){}).constructor)", ["'use strict'; yield 153;"]], |
| 307 ["((function*(){}).constructor)", ["'use strong'; yield 153;"]], |
304 "Int8Array", | 308 "Int8Array", |
305 "Int16Array", | 309 "Int16Array", |
306 "Int32Array", | 310 "Int32Array", |
307 "Map", | 311 "Map", |
308 "Number", | 312 "Number", |
309 "Object", | 313 "Object", |
310 ["Promise", [(resolve, reject)=>{}]], | 314 ["Promise", [(resolve, reject)=>{}]], |
311 "RangeError", | 315 "RangeError", |
312 "ReferenceError", | 316 "ReferenceError", |
313 "RegExp", | 317 "RegExp", |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 for (var realm of [realm1, realm2]) { | 372 for (var realm of [realm1, realm2]) { |
369 test(realm, getname(intrinsic), getargs(intrinsic), convert); | 373 test(realm, getname(intrinsic), getargs(intrinsic), convert); |
370 } | 374 } |
371 } | 375 } |
372 } | 376 } |
373 | 377 |
374 test_all(test_intrinsic_default, (v)=>v); | 378 test_all(test_intrinsic_default, (v)=>v); |
375 test_all(test_intrinsic_default, | 379 test_all(test_intrinsic_default, |
376 (v)=>{ "use strict"; return class extends v {}}); | 380 (v)=>{ "use strict"; return class extends v {}}); |
377 })(); | 381 })(); |
OLD | NEW |