mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibJS: Improve correctness of rounding and bitwise operations
Patch from Anonymous
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 22:35:07 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/16a0e7a66db
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user