]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/other-is-object-or-null.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / other-is-object-or-null.js
CommitLineData
ed1e77d3
A
1function foo(p) {
2 var x = p ? null : void 0;
3 return (typeof x) == "object";
4}
5
6noInline(foo);
7
8for (var i = 0; i < 10000; ++i) {
9 var p = !!(i & 1);
10 var result = foo(p);
11 if (result !== p)
12 throw "Error: bad result for p = " + p + ": " + result;
13}