OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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-arrow-functions | |
6 | |
7 | 5 |
8 (function testInFunctionDeclaration() { | 6 (function testInFunctionDeclaration() { |
9 var calls = 0; | 7 var calls = 0; |
10 function f() { | 8 function f() { |
11 (() => { | 9 (() => { |
12 calls++; | 10 calls++; |
13 assertEquals(2, arguments.length); | 11 assertEquals(2, arguments.length); |
14 assertEquals('a', arguments[0]); | 12 assertEquals('a', arguments[0]); |
15 assertEquals('b', arguments[1]); | 13 assertEquals('b', arguments[1]); |
16 })(); | 14 })(); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 var calls = 0; | 147 var calls = 0; |
150 function f(arguments) { | 148 function f(arguments) { |
151 (() => { | 149 (() => { |
152 calls++; | 150 calls++; |
153 assertEquals('a', arguments); | 151 assertEquals('a', arguments); |
154 })(); | 152 })(); |
155 } | 153 } |
156 f('a'); | 154 f('a'); |
157 assertEquals(1, calls); | 155 assertEquals(1, calls); |
158 })(); | 156 })(); |
OLD | NEW |