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); |