openpgp: fix vet issue in tests

https://golang.org/cl/111416 made vet spot this new issue by recognizing
the len() call as side-effect free:

    redundant or: md.IsSymmetricallyEncrypted || md.IsSymmetricallyEncrypted

Change-Id: I8b72eedb458365a50e14d5eec35b972ee61efb1f
Reviewed-on: https://go-review.googlesource.com/112255
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
This commit is contained in:
Filippo Valsorda 2018-05-08 20:42:30 -04:00
Родитель 4ec37c66ab
Коммит 21052ae466
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -124,7 +124,7 @@ func checkSignedMessage(t *testing.T, signedHex, expected string) {
return
}
if !md.IsSigned || md.SignedByKeyId != 0xa34d7e18c20c31bb || md.SignedBy == nil || md.IsEncrypted || md.IsSymmetricallyEncrypted || len(md.EncryptedToKeyIds) != 0 || md.IsSymmetricallyEncrypted {
if !md.IsSigned || md.SignedByKeyId != 0xa34d7e18c20c31bb || md.SignedBy == nil || md.IsEncrypted || md.IsSymmetricallyEncrypted || len(md.EncryptedToKeyIds) != 0 || md.DecryptedWith != (Key{}) {
t.Errorf("bad MessageDetails: %#v", md)
}