summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/TypedArray/toReversed-detached.js
blob: ae2a7841807709c3a9eb9d007f0fb6a09ab2be07 (plain)
1
2
3
4
5
6
7
8
9
10
// |reftest| shell-option(--enable-change-array-by-copy) skip-if(!Int32Array.prototype.toReversed)

var ta = new Int32Array([3, 2, 1]);

detachArrayBuffer(ta.buffer);

assertThrowsInstanceOf(() => ta.toReversed(), TypeError);

if (typeof reportCompare === "function")
  reportCompare(0, 0);