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

Side by Side Diff: test/mjsunit/harmony/spread-call.js

Issue 1371963002: [es6] Ship rest parameters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
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-spreadcalls 5 // Flags: --harmony-spread-calls
6 6
7 (function testSpreadCallsStrict() { 7 (function testSpreadCallsStrict() {
8 "use strict" 8 "use strict"
9 function countArgs() { return arguments.length; } 9 function countArgs() { return arguments.length; }
10 10
11 // Test this argument 11 // Test this argument
12 function returnThis() { return this; } 12 function returnThis() { return this; }
13 assertEquals(void 0, returnThis(..."test")); 13 assertEquals(void 0, returnThis(..."test"));
14 14
15 // Test argument counting with different iterables 15 // Test argument counting with different iterables
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 365
366 assertEquals(3, returnCountStrict(...[1])); 366 assertEquals(3, returnCountStrict(...[1]));
367 assertEquals(4, returnCountStrict(1, ...[2])); 367 assertEquals(4, returnCountStrict(1, ...[2]));
368 assertEquals(5, returnCountStrict(1, ...[2], 3)); 368 assertEquals(5, returnCountStrict(1, ...[2], 3));
369 assertEquals(3, returnCountSloppy(...[1])); 369 assertEquals(3, returnCountSloppy(...[1]));
370 assertEquals(4, returnCountSloppy(1, ...[2])); 370 assertEquals(4, returnCountSloppy(1, ...[2]));
371 assertEquals(5, returnCountSloppy(1, ...[2], 3)); 371 assertEquals(5, returnCountSloppy(1, ...[2], 3));
372 372
373 Object.defineProperty(Array.prototype, Symbol.iterator, origIterator); 373 Object.defineProperty(Array.prototype, Symbol.iterator, origIterator);
374 })(); 374 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698