blob: 13f564181b6d75620373b998077f7a2a3824b22a [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
function test(target)
{
return Object(target);
}
noInline(test);
(function () {
for (var i = 0; i < 1e4; ++i) {
var object = test("Cocoa");
shouldBe(object instanceof String, true);
shouldBe(object.valueOf(), "Cocoa");
}
}());