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

Unified Diff: test/mjsunit/harmony/rest-params.js

Issue 1272673003: [es6] Re-implement rest parameters via desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Oops. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« src/parser.h ('K') | « test/mjsunit/harmony/regress/regress-508074.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/rest-params.js
diff --git a/test/mjsunit/harmony/rest-params.js b/test/mjsunit/harmony/rest-params.js
index 49515f4f2c964678fb61e729ba0012a2edb112c0..6ceb87e3318fd725477e7679541311872314cdec 100644
--- a/test/mjsunit/harmony/rest-params.js
+++ b/test/mjsunit/harmony/rest-params.js
@@ -16,6 +16,7 @@
return args.length; })(1,2,3,4,5));
})();
+
var strictTest = (function() {
"use strict";
return function strictTest(a, b, ...c) {
@@ -31,6 +32,7 @@ var strictTest = (function() {
};
})();
+
function sloppyTest(a, b, ...c) {
assertEquals(Array, c.constructor);
assertTrue(Array.isArray(c));
@@ -169,22 +171,6 @@ var O = {
})();
-/* TODO(caitp): support arrow functions (blocked on spread operator support)
-(function testRestParamsArrowFunctions() {
- "use strict";
-
- var fn = (a, b, ...c) => c;
- assertEquals([], fn());
- assertEquals([], fn(1, 2));
- assertEquals([3], fn(1, 2, 3));
- assertEquals([3, 4], fn(1, 2, 3, 4));
- assertEquals([3, 4, 5], fn(1, 2, 3, 4, 5));
- assertThrows("var x = ...y => y;", SyntaxError);
- assertEquals([], ((...args) => args)());
- assertEquals([1,2,3], ((...args) => args)(1,2,3));
-})();*/
-
-
(function testRestParamsWithNewTarget() {
"use strict";
class Base {
« src/parser.h ('K') | « test/mjsunit/harmony/regress/regress-508074.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698