mirror of
https://github.com/golang/go
synced 2024-11-20 08:04:42 -07:00
crypto/openpgp: fix test prints
R=agl, agl1 CC=golang-dev https://golang.org/cl/4255041
This commit is contained in:
parent
d1cd829405
commit
54f0040723
@ -79,7 +79,7 @@ func checkSignedMessage(t *testing.T, signedHex, expected string) {
|
|||||||
t.Errorf("bad UnverifiedBody got:%s want:%s", string(contents), expected)
|
t.Errorf("bad UnverifiedBody got:%s want:%s", string(contents), expected)
|
||||||
}
|
}
|
||||||
if md.SignatureError != nil || md.Signature == nil {
|
if md.SignatureError != nil || md.Signature == nil {
|
||||||
t.Error("failed to validate: %s", md.SignatureError)
|
t.Errorf("failed to validate: %s", md.SignatureError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ func TestSignedEncryptedMessage(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if md.SignatureError != nil || md.Signature == nil {
|
if md.SignatureError != nil || md.Signature == nil {
|
||||||
t.Error("failed to validate: %s", md.SignatureError)
|
t.Errorf("failed to validate: %s", md.SignatureError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,12 +200,12 @@ func testDetachedSignature(t *testing.T, kring KeyRing, signature io.Reader, sig
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if signer == nil {
|
if signer == nil {
|
||||||
t.Errorf("%s: signer is nil")
|
t.Errorf("%s: signer is nil", tag)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
expectedSignerKeyId := uint64(0xa34d7e18c20c31bb)
|
expectedSignerKeyId := uint64(0xa34d7e18c20c31bb)
|
||||||
if signer.PrimaryKey.KeyId != expectedSignerKeyId {
|
if signer.PrimaryKey.KeyId != expectedSignerKeyId {
|
||||||
t.Errorf("%s: wrong signer got:%x want:%x", signer.PrimaryKey.KeyId, expectedSignerKeyId)
|
t.Errorf("%s: wrong signer got:%x want:%x", tag, signer.PrimaryKey.KeyId, expectedSignerKeyId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user