1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 13:35:07 +00:00

LibJS: Add BigInt

This commit is contained in:
Linus Groh 2020-06-06 01:14:10 +01:00 committed by Andreas Kling
parent 40829b849a
commit 0ff9d7e189
32 changed files with 1910 additions and 636 deletions

View file

@ -15,6 +15,7 @@ try {
duplicate: "world"
};
assert(o[1] === 23);
assert(o[1n] === 23);
assert(o["1"] === 23);
assert(o.foo === "bar");
assert(o["foo"] === "bar");
@ -30,6 +31,9 @@ try {
o[10] = "123";
assert(o[10] === "123");
assert(o["10"] === "123");
o[10n] = "123";
assert(o[10] === "123");
assert(o["10"] === "123");
o[-1] = "hello friends";
assert(o[-1] === "hello friends");
assert(o["-1"] === "hello friends");