diff options
Diffstat (limited to 'js/src/jit-test/tests/typedarray/sort.js')
-rw-r--r-- | js/src/jit-test/tests/typedarray/sort.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/typedarray/sort.js b/js/src/jit-test/tests/typedarray/sort.js new file mode 100644 index 000000000..45d1b2ac2 --- /dev/null +++ b/js/src/jit-test/tests/typedarray/sort.js @@ -0,0 +1,24 @@ +setJitCompilerOption("ion.warmup.trigger", 40); + +const constructors = [ + Int8Array, + Uint8Array, + Uint8ClampedArray, + Int16Array, + Uint16Array, + Int32Array, + Uint32Array, + Float32Array, + Float64Array ]; + +// Ensure that when creating TypedArrays under JIT +// the sort() method works as expected (bug 1295034). +for (var ctor of constructors) { + for (var _ of Array(1024)) { + var testArray = new ctor(10); + testArray.sort(); + } +} + +if (typeof reportCompare === "function") + reportCompare(true, true); |