Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: test/mjsunit/harmony/trailing-commas-length.js

Issue 2094463002: Allow trailing commas in function parameter lists (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --harmony-trailing-commas
6
7 function f1(a,) {}
8 function f2(a,b,) {}
9 function f3(a,b,c,) {}
10 assertEquals(1, f1.length);
11 assertEquals(2, f2.length);
12 assertEquals(3, f3.length);
13
14 function* g1(a,) {}
15 function* g2(a,b,) {}
16 function* g3(a,b,c,) {}
17 assertEquals(1, g1.length);
18 assertEquals(2, g2.length);
19 assertEquals(3, g3.length);
20
21 assertEquals(1, (function(a,) {}).length);
22 assertEquals(2, (function(a,b,) {}).length);
23 assertEquals(3, (function(a,b,c,) {}).length);
24
25 assertEquals(1, (function*(a,) {}).length);
26 assertEquals(2, (function*(a,b,) {}).length);
27 assertEquals(3, (function*(a,b,c,) {}).length);
28
29 assertEquals(1, ((a,) => {}).length);
30 assertEquals(2, ((a,b,) => {}).length);
31 assertEquals(3, ((a,b,c,) => {}).length);
OLDNEW
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698