Index: test/mjsunit/harmony/rest-params.js |
diff --git a/test/mjsunit/harmony/rest-params.js b/test/mjsunit/harmony/rest-params.js |
index fe7ee2adb81186076d1a32bee92642d1a2cdc430..0b05d33824252ee2e5aa8eb3a123096badcf0bbd 100644 |
--- a/test/mjsunit/harmony/rest-params.js |
+++ b/test/mjsunit/harmony/rest-params.js |
@@ -16,18 +16,20 @@ |
return args.length; })(1,2,3,4,5)); |
})(); |
-function strictTest(a, b, ...c) { |
+var strictTest = (function() { |
"use strict"; |
- assertEquals(Array, c.constructor); |
- assertTrue(Array.isArray(c)); |
+ return function strictTest(a, b, ...c) { |
+ assertEquals(Array, c.constructor); |
+ assertTrue(Array.isArray(c)); |
- var expectedLength = arguments.length >= 3 ? arguments.length - 2 : 0; |
- assertEquals(expectedLength, c.length); |
+ var expectedLength = arguments.length >= 3 ? arguments.length - 2 : 0; |
+ assertEquals(expectedLength, c.length); |
- for (var i = 2, j = 0; i < arguments.length; ++i) { |
- assertEquals(c[j++], arguments[i]); |
- } |
-} |
+ for (var i = 2, j = 0; i < arguments.length; ++i) { |
+ assertEquals(c[j++], arguments[i]); |
+ } |
+ }; |
+})(); |
function sloppyTest(a, b, ...c) { |
assertEquals(Array, c.constructor); |
@@ -144,8 +146,8 @@ var O = { |
(function testNoAliasArgumentsStrict() { |
+ "use strict"; |
function strictF(a, ...rest) { |
- "use strict"; |
arguments[0] = 1; |
assertEquals(3, a); |
arguments[1] = 2; |