mirror of
https://github.com/RGBCube/serenity
synced 2025-07-03 05:32:13 +00:00
LibJS: Improve correctness of rounding and bitwise operations
Patch from Anonymous
This commit is contained in:
parent
6622ad8895
commit
16a0e7a66d
9 changed files with 106 additions and 19 deletions
|
@ -26,6 +26,10 @@ test("basic numeric shifting", () => {
|
|||
expect(42 >>> 3).toBe(5);
|
||||
expect(42 >>> 4).toBe(2);
|
||||
expect(42 >>> 5).toBe(1);
|
||||
|
||||
expect(0xffffffff >>> 0).toBe(4294967295);
|
||||
expect(0xffffffff >>> 16).toBe(65535);
|
||||
expect((0xf0000000 * 2) >>> 16).toBe(57344);
|
||||
});
|
||||
|
||||
test("numeric shifting with negative lhs values", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue