mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 12:04:59 +00:00
LibJS: Correctness fixes for bitwise_or, address FIXME's in test.
This commit is contained in:
parent
3e8cf79efa
commit
41bfff1abe
2 changed files with 20 additions and 8 deletions
|
@ -48,14 +48,14 @@ try {
|
|||
assert(("42" | 6) === 46);
|
||||
assert((x | y) === 7);
|
||||
assert((x | [[[[12]]]]) === 15);
|
||||
// FIXME: These should all return 0
|
||||
// assert((undefined | y) === 7);
|
||||
// assert(("a" | "b") === 0);
|
||||
// assert((null | null) === 0);
|
||||
// assert((undefined | undefined) === 0);
|
||||
// assert((NaN | NaN) === 0);
|
||||
// assert((Infinity | Infinity) === 0);
|
||||
// assert((-Infinity | Infinity) === 0);
|
||||
assert((undefined | y) === 7);
|
||||
assert(("a" | "b") === 0);
|
||||
assert((null | null) === 0);
|
||||
assert((undefined | undefined) === 0);
|
||||
assert((NaN | NaN) === 0);
|
||||
assert((NaN | 6) === 6);
|
||||
assert((Infinity | Infinity) === 0);
|
||||
assert((-Infinity | Infinity) === 0);
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue