]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/regexp-matches-array.js
1 function testArrayConcat() {
2 var array
= 'abc'.match(/(a)(b)(c)/);
3 var result
= array
.concat();
4 var expectedResult
= ["abc", "a", "b", "c"];
6 if (result
.length
!= 4)
7 throw new Error("Runtime array length is incorrect");
8 for (var i
= 0; i
< result
.length
; i
++) {
9 if (result
[i
] != expectedResult
[i
])
10 throw new Error("Runtime array concat result is incorrect");