X-Git-Url: https://git.ladys.computer/Pisces/blobdiff_plain/8fcb8f6d937fadd7aa8016f8ba33004d1bd79bf0..2aaa51c0d16852726d2402bfb7953fab182afc01:/numeric.test.js diff --git a/numeric.test.js b/numeric.test.js index ea99bc9..96f51c1 100644 --- a/numeric.test.js +++ b/numeric.test.js @@ -150,6 +150,11 @@ describe("toIntN", () => { it("[[Call]] works with numbers", () => { assertStrictEquals(toIntN(2, 7), -1); }); + + it("[[Call]] works with non‐integers", () => { + assertStrictEquals(toIntN(2, 7.21), -1); + assertStrictEquals(toIntN(2, Infinity), 0); + }); }); describe("toIntegerOrInfinity", () => { @@ -212,4 +217,9 @@ describe("toUintN", () => { it("[[Call]] works with numbers", () => { assertStrictEquals(toUintN(2, 7), 3); }); + + it("[[Call]] works with non‐integers", () => { + assertStrictEquals(toUintN(2, 7.21), 3); + assertStrictEquals(toUintN(2, Infinity), 0); + }); });