(t *testing.T)
| 76 | } |
| 77 | |
| 78 | func TestBitReaderSkip(t *testing.T) { |
| 79 | w := NewBitWriter(16) |
| 80 | w.WriteBits(0xAB, 8) |
| 81 | w.WriteBits(0xCD, 8) |
| 82 | w.WriteBits(0xEF, 8) |
| 83 | |
| 84 | r := NewBitReader(w.Bytes()) |
| 85 | r.Skip(8) |
| 86 | require.Equal(t, 8, r.Pos()) |
| 87 | require.Equal(t, uint32(0xCD), r.ReadBits(8)) |
| 88 | require.Equal(t, uint32(0xEF), r.ReadBits(8)) |
| 89 | } |
| 90 | |
| 91 | func TestBitWriterBytePadding(t *testing.T) { |
| 92 | // 12 bits written -> 2 bytes, low 4 bits of the last byte are zero padding. |
nothing calls this directly
no test coverage detected
searching dependent graphs…