| Index: test/mjsunit/harmony/typedarray-find.js
|
| diff --git a/test/mjsunit/harmony/typedarray-find.js b/test/mjsunit/harmony/typedarray-find.js
|
| index 5e3512571868c4454a147930bcc820b5b75f010e..3b7ba1e0e9194e935474ec43fc12cb3179201798 100644
|
| --- a/test/mjsunit/harmony/typedarray-find.js
|
| +++ b/test/mjsunit/harmony/typedarray-find.js
|
| @@ -176,4 +176,14 @@ assertThrows('new constructor([]).find({})', TypeError);
|
| assertThrows('new constructor([]).find([])', TypeError);
|
| assertThrows('new constructor([]).find(/\d+/)', TypeError);
|
|
|
| +// Shadowing length doesn't affect find, unlike Array.prototype.find
|
| +a = new constructor([1, 2]);
|
| +Object.defineProperty(a, 'length', {value: 1});
|
| +var x = 0;
|
| +assertEquals(a.find(function(elt) { x += elt; return false; }), undefined);
|
| +assertEquals(x, 3);
|
| +assertEquals(Array.prototype.find.call(a,
|
| + function(elt) { x += elt; return false; }), undefined);
|
| +assertEquals(x, 4);
|
| +
|
| }
|
|
|