]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/openpgp: fix test prints
authorRob Pike <r@golang.org>
Fri, 25 Feb 2011 21:44:37 +0000 (13:44 -0800)
committerRob Pike <r@golang.org>
Fri, 25 Feb 2011 21:44:37 +0000 (13:44 -0800)
R=agl, agl1
CC=golang-dev
https://golang.org/cl/4255041

src/pkg/crypto/openpgp/read_test.go

index 7e73dec6e1cdd6094262fad861ae36278598a867..58199e1329738f0dc5b3548be3dec22d81e20367 100644 (file)
@@ -79,7 +79,7 @@ func checkSignedMessage(t *testing.T, signedHex, expected string) {
                t.Errorf("bad UnverifiedBody got:%s want:%s", string(contents), expected)
        }
        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 {
-               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
        }
        if signer == nil {
-               t.Errorf("%s: signer is nil")
+               t.Errorf("%s: signer is nil", tag)
                return
        }
        expectedSignerKeyId := uint64(0xa34d7e18c20c31bb)
        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)
        }
 }