mirror of
https://github.com/FiloSottile/age.git
synced 2026-08-30 12:47:13 +00:00
internal/stream: simplify a min() computation in tests (#727)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user