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

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

Issue 1300103005: [parser] disallow language mode directive in body of function with non-simple parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: flag implications don't work in test suite? Created 5 years, 4 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
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/mjsunit/harmony/default-parameters.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/arrow-rest-params.js
diff --git a/test/mjsunit/harmony/arrow-rest-params.js b/test/mjsunit/harmony/arrow-rest-params.js
index b1e8dcc1b99b484a9257b1f3a4c73ad5c94db0e1..0ee77390ed21496f590de890686891c29e7c3f96 100644
--- a/test/mjsunit/harmony/arrow-rest-params.js
+++ b/test/mjsunit/harmony/arrow-rest-params.js
@@ -18,18 +18,20 @@
//
// strictTest(6,5,4,3,2,1)
//
-var strictTest = (a, b, ...c) => {
+var strictTest = (() => {
"use strict";
- assertEquals(Array, c.constructor);
- assertTrue(Array.isArray(c));
+ return (a, b, ...c) => {
+ assertEquals(Array, c.constructor);
+ assertTrue(Array.isArray(c));
- var expectedLength = (a === undefined) ? 0 : a - 2;
- assertEquals(expectedLength, c.length);
+ var expectedLength = (a === undefined) ? 0 : a - 2;
+ assertEquals(expectedLength, c.length);
- for (var i = 2; i < a; ++i) {
- assertEquals(c[i - 2], a - i);
- }
-}
+ for (var i = 2; i < a; ++i) {
+ assertEquals(c[i - 2], a - i);
+ }
+ };
+})();
var sloppyTest = (a, b, ...c) => {
assertEquals(Array, c.constructor);
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | test/mjsunit/harmony/default-parameters.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698