diff options
Diffstat (limited to 'js/src/tests/ecma_6/TypedArray/sort_globals.js')
-rw-r--r-- | js/src/tests/ecma_6/TypedArray/sort_globals.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/TypedArray/sort_globals.js b/js/src/tests/ecma_6/TypedArray/sort_globals.js new file mode 100644 index 000000000..6bab6a391 --- /dev/null +++ b/js/src/tests/ecma_6/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); |