diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/arrays/to-spliced-dense-elements.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arrays/to-spliced-dense-elements.js b/js/src/jit-test/tests/arrays/to-spliced-dense-elements.js new file mode 100644 index 0000000000..fa8749c85c --- /dev/null +++ b/js/src/jit-test/tests/arrays/to-spliced-dense-elements.js @@ -0,0 +1,13 @@ +// |jit-test| --enable-change-array-by-copy + +for (let i = 0; i < 1000; ++i) { + let arr = [0]; + let result = arr.toSpliced(0, 0, 1, 2, 3); + assertEq(result.length, 4); +} + +for (let i = 0; i < 1000; ++i) { + let arr = [0]; + let result = arr.toSpliced(1, 0, 1, 2, 3); + assertEq(result.length, 4); +} |