blob: e5b2b470bbc95510df9555c0778faa1101c02a6d [file] [log] [blame] [edit]
function foo(o) {
return String(o);
}
noInline(foo);
for (var i = 0; i < testLoopCount; ++i) {
var result = foo(new String("hello"));
if (typeof result != "string") {
describe(result);
throw "Error: result isn't a string";
}
if (result != "hello")
throw "Error: bad result: " + result;
result = foo("world");
if (typeof result != "string") {
describe(result);
throw "Error: result isn't a string";
}
if (result != "world")
throw "Error: bad result: " + result;
}