mirror of
https://github.com/octoleo/restic.git
synced 2024-12-03 18:38:20 +00:00
crypto: Test length
This commit is contained in:
parent
f8e1043ad3
commit
7a7cc5b39f
@ -126,9 +126,11 @@ func BenchmarkEncryptWriter(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
rd.Seek(0, 0)
|
||||
wr := crypto.EncryptTo(k, ioutil.Discard)
|
||||
_, err := io.Copy(wr, rd)
|
||||
n, err := io.Copy(wr, rd)
|
||||
OK(b, err)
|
||||
OK(b, wr.Close())
|
||||
Assert(b, n == int64(size),
|
||||
"not enough bytes writter: want %d, got %d", size, n)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user