mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LibJS: Uncomment and add parseInt tests
Added another test that checks radices > 16, as well as uncommented several "FIXME" tests that are now working.
This commit is contained in:
parent
aa5b144f90
commit
0bf597e99d
Notes:
sideshowbarker
2024-07-18 12:59:41 +09:00
Author: https://github.com/IdanHo
Commit: 0bf597e99d
Pull-request: https://github.com/SerenityOS/serenity/pull/7830
1 changed files with 9 additions and 9 deletions
|
@ -29,15 +29,15 @@ test("basic parseInt() functionality", () => {
|
|||
expect(parseInt(4.7, 10)).toBe(4);
|
||||
expect(parseInt("0e0", 16)).toBe(224);
|
||||
expect(parseInt("123_456")).toBe(123);
|
||||
|
||||
// FIXME: expect(parseInt(4.7 * 1e22, 10)).toBe(4);
|
||||
// FIXME: expect(parseInt(0.00000000000434, 10)).toBe(4);
|
||||
// FIXME: expect(parseInt(0.0000001,11)).toBe(1);
|
||||
// FIXME: expect(parseInt(0.000000124,10)).toBe(1);
|
||||
// FIXME: expect(parseInt(1e-7,10)).toBe(1);
|
||||
// FIXME: expect(parseInt(1000000000000100000000,10)).toBe(1);
|
||||
// FIXME: expect(parseInt(123000000000010000000000,10)).toBe(1);
|
||||
// FIXME: expect(parseInt(1e+21,10)).toBe(1);
|
||||
expect(parseInt("UVWXYZ", 36)).toBe(1867590395);
|
||||
expect(parseInt(4.7 * 1e22, 10)).toBe(4);
|
||||
expect(parseInt(0.00000000000434, 10)).toBe(4);
|
||||
expect(parseInt(0.0000001, 11)).toBe(1);
|
||||
expect(parseInt(0.000000124, 10)).toBe(1);
|
||||
expect(parseInt(1e-7, 10)).toBe(1);
|
||||
expect(parseInt(1000000000000100000000, 10)).toBe(1);
|
||||
expect(parseInt(123000000000010000000000, 10)).toBe(1);
|
||||
expect(parseInt(1e21, 10)).toBe(1);
|
||||
// FIXME: expect(parseInt('900719925474099267n')).toBe(900719925474099300)
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue