Skip to content

Commit

Permalink
expand test to also check filling in zeros
Browse files Browse the repository at this point in the history
  • Loading branch information
KillingSpark committed Dec 28, 2024
1 parent 32849f4 commit 181ac6f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/decoding/bit_reader_reverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,11 @@ mod test {
assert_eq!(br.get_bits(1), 0);
assert_eq!(br.get_bits(4), 0b1010);
assert_eq!(br.get_bits(4), 0b1101);
assert_eq!(br.get_bits(4), 0b0101);
// Last 0 from source, three zeroes filled in
assert_eq!(br.get_bits(4), 0b0000);
// All zeroes filled in
assert_eq!(br.get_bits(4), 0b0000);
assert_eq!(br.bits_remaining(), -7);
}
}

0 comments on commit 181ac6f

Please sign in to comment.