internal/stream: simplify a min() computation in tests (#727)
This commit is contained in:
parent
a68b8e921b
commit
7c7978c12e
1 changed files with 1 additions and 4 deletions
|
|
@ -266,10 +266,7 @@ func TestDecryptReaderAt(t *testing.T) {
|
|||
|
||||
// Verify data correctness
|
||||
if n > 0 && off >= 0 && off < int64(plaintextSize) {
|
||||
end := int(off) + n
|
||||
if end > plaintextSize {
|
||||
end = plaintextSize
|
||||
}
|
||||
end := min(int(off)+n, plaintextSize)
|
||||
if !bytes.Equal(p[:n], plaintext[off:end]) {
|
||||
t.Errorf("%s: data mismatch", name)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue