1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:57:35 +00:00

LibJS: Use u64 instead of u32 in NumberPrototype::to_string

Update to #7033
Partial fix for #7034 (just ups the range to about 2 ** 54 before
losing precision)
This commit is contained in:
Luke 2021-05-11 18:19:41 +01:00 committed by Linus Groh
parent 2ff03ecfa8
commit c5c9494f48
2 changed files with 3 additions and 2 deletions

View file

@ -16,6 +16,7 @@ describe("correct behavior", () => {
// Numbers above 2 ** 31 - 1 (Issue #3931)
[2147483648, "2147483648"], // 2 ** 31
[4294967295, "4294967295"], // 2 ** 32 - 1
[18014398509481984, "18014398509481984"], // 2 ** 54
].forEach(testCase => {
expect(testCase[0].toString()).toBe(testCase[1]);
});