X-Git-Url: https://git.ladys.computer/Pisces/blobdiff_plain/d4fe7e59e1444b5e29a71b80d89a8ad5aa1158bd..6e6d4e3261c1c943fe44fa9e381bcf8bf1441fd6:/binary.test.js diff --git a/binary.test.js b/binary.test.js index f3c8317..82fa4e0 100755 --- a/binary.test.js +++ b/binary.test.js @@ -356,9 +356,11 @@ describe("base32Binary", () => { assertThrows(() => base32Binary("CT3ZYAY==")); }); - it("[[Call]] throws when provided with a length with a remainder of 1 when divided by 4", () => { + it("[[Call]] throws when provided with a length with a remainder of 1, 3 ∣ 6 when divided by 8", () => { assertThrows(() => base32Binary("234BCDEAA")); assertThrows(() => base32Binary("234BCDEAA=======")); + assertThrows(() => base32Binary("UHI")); + assertThrows(() => base32Binary("UHIUJD")); }); }); @@ -863,6 +865,13 @@ describe("wrmgBase32Binary", () => { assertThrows(() => wrmgBase32Binary("ABC=")); }); + it("[[Call]] throws when provided with a length with a remainder of 1, 3 ∣ 6 when divided by 8", () => { + assertThrows(() => base32Binary("TVW123400")); + assertThrows(() => base32Binary("TVW123400=======")); + assertThrows(() => base32Binary("M78")); + assertThrows(() => base32Binary("M78M93")); + }); + it("[[Call]] throws when provided with a length with a remainder of 1 when divided by 4", () => { assertThrows(() => wrmgBase32Binary("234BCDEAA")); assertThrows(() => wrmgBase32Binary("2-34-B--CD-EA-A-"));