| 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 testReflectApplyArity() { | 6 (function testReflectApplyArity() { |
| 9 assertEquals(3, Reflect.apply.length); | 7 assertEquals(3, Reflect.apply.length); |
| 10 })(); | 8 })(); |
| 11 | 9 |
| 12 | 10 |
| 13 (function testReflectApplyNonConstructor() { | 11 (function testReflectApplyNonConstructor() { |
| 14 assertThrows(function() { | 12 assertThrows(function() { |
| 15 new Reflect.apply(function(){}, null, []); | 13 new Reflect.apply(function(){}, null, []); |
| 16 }, TypeError); | 14 }, TypeError); |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 ["T", "E", "S", "T", "!", "!"])); | 201 ["T", "E", "S", "T", "!", "!"])); |
| 204 assertEquals(10, Reflect.apply(returnSumStrict, this, | 202 assertEquals(10, Reflect.apply(returnSumStrict, this, |
| 205 { 0: 1, 1: 2, 2: 3, 3: 4, length: 4 })); | 203 { 0: 1, 1: 2, 2: 3, 3: 4, length: 4 })); |
| 206 assertEquals("TEST", Reflect.apply(returnSumSloppy, this, | 204 assertEquals("TEST", Reflect.apply(returnSumSloppy, this, |
| 207 ["T", "E", "S", "T"])); | 205 ["T", "E", "S", "T"])); |
| 208 assertEquals("TEST!!", Reflect.apply(returnSumSloppy, this, | 206 assertEquals("TEST!!", Reflect.apply(returnSumSloppy, this, |
| 209 ["T", "E", "S", "T", "!", "!"])); | 207 ["T", "E", "S", "T", "!", "!"])); |
| 210 assertEquals(10, Reflect.apply(returnSumSloppy, this, | 208 assertEquals(10, Reflect.apply(returnSumSloppy, this, |
| 211 { 0: 1, 1: 2, 2: 3, 3: 4, length: 4 })); | 209 { 0: 1, 1: 2, 2: 3, 3: 4, length: 4 })); |
| 212 })(); | 210 })(); |
| OLD | NEW |