mirror of
https://github.com/restic/restic.git
synced 2024-12-23 08:16:36 +00:00
crypto: Test length
This commit is contained in:
parent
f8e1043ad3
commit
7a7cc5b39f
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue