append bug fix + unit tests

This commit is contained in:
ferricles 2022-07-06 21:40:50 -07:00
parent 80b65eb0e4
commit ec241891fc

View file

@ -347,7 +347,7 @@ Base64 = (function () {
this.bits[curr_idx] |= (char << pos);
//if we go to the "next" char, update it
if (Math.floor((pos - 1) / 32) < Math.floor((pos + 5) / 32)) {
if (Math.floor(pos / 32) < Math.floor((pos + 5) / 32)) {
this.bits[curr_idx + 1] |= (char >>> (6 - (pos + 6) % 32));
}
@ -782,7 +782,6 @@ function deepcopy(obj) {
}
function bv_test() {
console.log("=====STARTING BITVECTOR UNIT TESTS=====");
// Empty Constructor + append str