]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/stress/for-in-string.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / stress / for-in-string.js
CommitLineData
ed1e77d3
A
1(function() {
2 // Iterate over characters in a string.
3 var o = "hello";
4 var foo = function(o) {
5 var result = "";
6 for (var s in o)
7 result += o[s];
8 return result;
9 };
10 noInline(foo);
11 for (var i = 0; i < 10000; ++i) {
12 if (foo("hello") !== "hello")
13 throw new Error("incorrect result");
14 }
15 foo(null);
16})();