]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - tests/stress/empty-function.js
JavaScriptCore-7600.1.4.9.tar.gz
[apple/javascriptcore.git] / tests / stress / empty-function.js
diff --git a/tests/stress/empty-function.js b/tests/stress/empty-function.js
new file mode 100644 (file)
index 0000000..612e510
--- /dev/null
@@ -0,0 +1,10 @@
+function foo() { }
+
+noInline(foo);
+
+for (var i = 0; i < 100000; ++i) {
+    var result = foo();
+    if (result !== void 0)
+        throw "You broke JSC so hard that even the empty function doesn't work: " + result;
+}
+