| Index: test/mjsunit/harmony/typedarrays-every.js
|
| diff --git a/test/mjsunit/harmony/typedarrays-every.js b/test/mjsunit/harmony/typedarrays-every.js
|
| index c81fd966ca623ae268b1d3b257fc07014574bf5f..e6acb566ac61a8adbf96a8b374b509106876cce7 100644
|
| --- a/test/mjsunit/harmony/typedarrays-every.js
|
| +++ b/test/mjsunit/harmony/typedarrays-every.js
|
| @@ -135,6 +135,16 @@ function TestTypedArrayForEach(constructor) {
|
| constructor.prototype.every.call(a, function (x) { count++; return true; });
|
| assertEquals(a.length, count);
|
| }
|
| +
|
| + // Shadowing length doesn't affect every, unlike Array.prototype.every
|
| + a = new constructor([1, 2]);
|
| + Object.defineProperty(a, 'length', {value: 1});
|
| + var x = 0;
|
| + assertEquals(a.every(function(elt) { x += elt; return true; }), true);
|
| + assertEquals(x, 3);
|
| + assertEquals(Array.prototype.every.call(a,
|
| + function(elt) { x += elt; return true; }), true);
|
| + assertEquals(x, 4);
|
| }
|
|
|
| for (i = 0; i < typedArrayConstructors.length; i++) {
|
|
|