| Index: test/mjsunit/harmony/array-findindex.js
|
| diff --git a/test/mjsunit/harmony/array-findindex.js b/test/mjsunit/harmony/array-findindex.js
|
| index a33849dab393afd1f233bd9ec5461d0c489e794a..63bd7c9483c97a0e9523fcac592b43f8cfaa4c83 100644
|
| --- a/test/mjsunit/harmony/array-findindex.js
|
| +++ b/test/mjsunit/harmony/array-findindex.js
|
| @@ -237,6 +237,17 @@ assertEquals(3, a.findIndex(function(val) { return 24 === val; }));
|
| return this.elementAt(key) === val;
|
| }, thisArg);
|
| assertEquals(1, index);
|
| +
|
| + // Create a new object in each function call when receiver is a primitive value.
|
| + a = new Array();
|
| + [1,2].findIndex(function() { a.push(this) }, "");
|
| + assertTrue(a[0] !== a[1]);
|
| +
|
| + // Do not create a new object in each function call when receiver is a primitive value.
|
| + a = new Array();
|
| + [1,2].findIndex(function() { a.push(this) }, {});
|
| + assertFalse(a[0] !== a[1]);
|
| +
|
| })();
|
|
|
| // Test exceptions
|
|
|