Add HashingWriter and HashAppendWriter
This commit is contained in:
parent
5801d9f42f
commit
5c724b92b8
3 changed files with 140 additions and 1 deletions
|
@ -65,7 +65,7 @@ func TestHashingReader(t *testing.T) {
|
|||
|
||||
assert(t, n == int64(size),
|
||||
"HashAppendReader: invalid number of bytes read: got %d, expected %d",
|
||||
n, size+len(expectedHash))
|
||||
n, size)
|
||||
|
||||
resultingHash := rd.Sum(nil)
|
||||
assert(t, bytes.Equal(expectedHash[:], resultingHash),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue