mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
LibJS: Implement BigInt loose-equality according to the spec
This commit is contained in:
parent
281b0411f2
commit
9ad3debf35
2 changed files with 16 additions and 6 deletions
|
@ -99,6 +99,16 @@ describe("correct behavior", () => {
|
|||
expect(Object(2n) == 1n).toBeFalse();
|
||||
expect(1n != Object(2n)).toBeTrue();
|
||||
expect(Object(2n) != 1n).toBeTrue();
|
||||
|
||||
expect(2n == "2").toBeTrue();
|
||||
expect(2n == "0b10").toBeTrue();
|
||||
expect(2n == "0o2").toBeTrue();
|
||||
expect(2n == "0x2").toBeTrue();
|
||||
|
||||
expect(1n == "2").toBeFalse();
|
||||
expect(1n == "0b10").toBeFalse();
|
||||
expect(1n == "0o2").toBeFalse();
|
||||
expect(1n == "0x2").toBeFalse();
|
||||
});
|
||||
|
||||
test("strong equality operators", () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue