blob: 5cee5e26871fee539c4096b33cb47c6e4f1a3e4f [file] [log] [blame]
var createBuiltin = $vm.createBuiltin;
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
var builtin = createBuiltin(`(function (a) {
return @argument(0);
})`);
(function () {
for (var i = 0; i < 1e4; ++i) {
shouldBe(builtin(), undefined);
shouldBe(builtin(42), 42);
}
}());