]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/regexp-matches-array.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / regexp-matches-array.js
CommitLineData
81345200
A
1function 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
14testArrayConcat();