blob: 8e2c25b5f74ab7f576fdf89d710f2aa57c08d957 [file] [log] [blame]
let assert = {
sameValue: function(i, e, m) {
if (i !== e)
throw new Error(m);
}
}
function bigIntMul(x, y) {
return x * y;
}
noInline(bigIntMul);
for (let i = 0; i < 10000; i++) {
let r = bigIntMul(3n, 10n);
assert.sameValue(r, 30n, 3n + " * " + 10n + " = " + r);
}
let r = bigIntMul(3, 10);
assert.sameValue(r, 30, 3 + " * " + 10 + " = " + r);
r = bigIntMul("3", "10");
assert.sameValue(r, 30, 3 + " * " + 10 + " = " + r);