blob: d02e552f9c799384e6d7c57ff0f88a86b451f8ec [file] [log] [blame]
//@ runBigIntEnabled
function assert(a, e, n) {
if (a !== e) {
throw new Error("Bad logical negation for " + n);
}
}
function logicalNot(a) {
return !a;
}
noInline(logicalNot);
for (let i = 0; i < 100000; i++) {
assert(logicalNot(10n), false, 10n);
assert(logicalNot(1n), false, 1n);
assert(logicalNot(0n), true, 0n);
assert(logicalNot(-1n), false, -1n);
}