mirror of https://github.com/tc39/test262.git
21 lines
374 B
JavaScript
21 lines
374 B
JavaScript
//@ runBigIntEnabled
|
|
|
|
function assert(a, e) {
|
|
if (a !== e) {
|
|
throw new Error("Bad!");
|
|
}
|
|
}
|
|
|
|
function logicalOr(a, b) {
|
|
return a || b;
|
|
}
|
|
noInline(logicalOr);
|
|
|
|
for (let i = 0; i < 100000; i++) {
|
|
assert(logicalOr(10n, "abc"), 10n);
|
|
assert(logicalOr(1n, "abc"), 1n);
|
|
assert(logicalOr(0n, "abc"), "abc");
|
|
assert(logicalOr(-1n, "abc"), -1n);
|
|
}
|
|
|