]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/regexp-matches-array.js
JavaScriptCore-7600.1.4.16.1.tar.gz
[apple/javascriptcore.git] / 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"];
5
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");
11 }
12 };
13
14 testArrayConcat();