diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/tests/non262/TypedArray/sort_globals.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/tests/non262/TypedArray/sort_globals.js b/js/src/tests/non262/TypedArray/sort_globals.js new file mode 100644 index 0000000000..6bab6a3913 --- /dev/null +++ b/js/src/tests/non262/TypedArray/sort_globals.js @@ -0,0 +1,9 @@ +// TypedArray.prototype.sort should work across globals +let g2 = newGlobal(); +assertEqArray( + Int32Array.prototype.sort.call(new g2.Int32Array([3, 2, 1])), + new Int32Array([1, 2, 3]) +); + +if (typeof reportCompare === "function") + reportCompare(true, true); |