blob: 3f2ebb15f746a98199c5bbed612c21220fb64269 [file] [log] [blame]
var createBuiltin = $vm.createBuiltin;
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
var builtin = createBuiltin(`(function (target) {
return @toObject(target, "");
})`);
noInline(builtin);
(function () {
for (var i = 0; i < 1e4; ++i) {
var object = builtin(true);
shouldBe(object instanceof Boolean, true);
shouldBe(object.valueOf(), true);
}
}());