]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - tests/stress/runtime-array.js
JavaScriptCore-7600.1.4.9.tar.gz
[apple/javascriptcore.git] / tests / stress / runtime-array.js
diff --git a/tests/stress/runtime-array.js b/tests/stress/runtime-array.js
new file mode 100644 (file)
index 0000000..aee6fd7
--- /dev/null
@@ -0,0 +1,13 @@
+function testArrayConcat() {
+    var array = createRuntimeArray(1, 2, 3);
+    var result = array.concat();
+
+    if (result.length != 3)
+        throw new Error("Runtime array length is incorrect");
+    for (var i = 0; i < result.length; i++) {
+        if (result[i] != i + 1)
+            throw new Error("Runtime array concat result is incorrect");
+    }
+};
+
+testArrayConcat();