X-Git-Url: https://git.ladys.computer/Pisces/blobdiff_plain/cb5a5ceca492121141a12d921afc78dbde7fbfa1..83f6aae0d1b8181dc2b0c6ccdba9f2fe2fdba3e6:/numeric.test.js?ds=inline diff --git a/numeric.test.js b/numeric.test.js index 27776cd..4d3d2cb 100644 --- a/numeric.test.js +++ b/numeric.test.js @@ -1,7 +1,7 @@ // ♓🌟 Piscēs ∷ numeric.test.js // ==================================================================== // -// Copyright © 2022 Lady [@ Lady’s Computer]. +// Copyright © 2022–2023 Lady [@ Lady’s Computer]. // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -28,10 +28,10 @@ import { toFloat32, toIntegralNumber, toIntegralNumberOrInfinity, - toIntN, toNumber, toNumeric, - toUintN, + toSignedIntegralNumeric, + toUnsignedIntegralNumeric, } from "./numeric.js"; describe("NEGATIVE_ZERO", () => { @@ -206,18 +206,18 @@ describe("toFloat32", () => { }); }); -describe("toIntN", () => { +describe("toSignedIntegralNumeric", () => { it("[[Call]] converts to an int·n", () => { - assertStrictEquals(toIntN(2, 7n), -1n); + assertStrictEquals(toSignedIntegralNumeric(2, 7n), -1n); }); it("[[Call]] works with numbers", () => { - assertStrictEquals(toIntN(2, 7), -1); + assertStrictEquals(toSignedIntegralNumeric(2, 7), -1); }); it("[[Call]] works with non‐integers", () => { - assertStrictEquals(toIntN(2, 7.21), -1); - assertStrictEquals(toIntN(2, Infinity), 0); + assertStrictEquals(toSignedIntegralNumeric(2, 7.21), -1); + assertStrictEquals(toSignedIntegralNumeric(2, Infinity), 0); }); }); @@ -306,17 +306,17 @@ describe("toNumeric", () => { }); }); -describe("toUintN", () => { +describe("toUnsignedIntegralNumeric", () => { it("[[Call]] converts to an int·n", () => { - assertStrictEquals(toUintN(2, 7n), 3n); + assertStrictEquals(toUnsignedIntegralNumeric(2, 7n), 3n); }); it("[[Call]] works with numbers", () => { - assertStrictEquals(toUintN(2, 7), 3); + assertStrictEquals(toUnsignedIntegralNumeric(2, 7), 3); }); it("[[Call]] works with non‐integers", () => { - assertStrictEquals(toUintN(2, 7.21), 3); - assertStrictEquals(toUintN(2, Infinity), 0); + assertStrictEquals(toUnsignedIntegralNumeric(2, 7.21), 3); + assertStrictEquals(toUnsignedIntegralNumeric(2, Infinity), 0); }); });