blob: fa8749c85c52ae2d5411d95bfaa755957937a31e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
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);
}
|