]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - tests/stress/uint32array-unsigned-load.js
JavaScriptCore-7600.1.4.9.tar.gz
[apple/javascriptcore.git] / tests / stress / uint32array-unsigned-load.js
diff --git a/tests/stress/uint32array-unsigned-load.js b/tests/stress/uint32array-unsigned-load.js
new file mode 100644 (file)
index 0000000..14c7959
--- /dev/null
@@ -0,0 +1,15 @@
+function foo(a) {
+    return a[0] + 1;
+}
+
+noInline(foo);
+
+var a = new Uint32Array(1);
+a[0] = -1;
+
+for (var i = 0; i < 10000; ++i) {
+    var result = foo(a);
+    if (result != 4294967296)
+        throw "Error: bad result: " + result;
+}
+