From f72f4169133572cf62f1e872c5657cdbc4d5de2c Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 30 Mar 2011 15:33:16 +0000 Subject: Update to current Go library. From-SVN: r171732 --- libgo/go/crypto/ecdsa/ecdsa_test.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'libgo/go/crypto/ecdsa') diff --git a/libgo/go/crypto/ecdsa/ecdsa_test.go b/libgo/go/crypto/ecdsa/ecdsa_test.go index cc22b7a..d6b4039 100644 --- a/libgo/go/crypto/ecdsa/ecdsa_test.go +++ b/libgo/go/crypto/ecdsa/ecdsa_test.go @@ -20,12 +20,15 @@ func testKeyGeneration(t *testing.T, c *elliptic.Curve, tag string) { return } if !c.IsOnCurve(priv.PublicKey.X, priv.PublicKey.Y) { - t.Errorf("%s: public key invalid", tag, err) + t.Errorf("%s: public key invalid: %s", tag, err) } } func TestKeyGeneration(t *testing.T) { testKeyGeneration(t, elliptic.P224(), "p224") + if testing.Short() { + return + } testKeyGeneration(t, elliptic.P256(), "p256") testKeyGeneration(t, elliptic.P384(), "p384") testKeyGeneration(t, elliptic.P521(), "p521") @@ -53,6 +56,9 @@ func testSignAndVerify(t *testing.T, c *elliptic.Curve, tag string) { func TestSignAndVerify(t *testing.T) { testSignAndVerify(t, elliptic.P224(), "p224") + if testing.Short() { + return + } testSignAndVerify(t, elliptic.P256(), "p256") testSignAndVerify(t, elliptic.P384(), "p384") testSignAndVerify(t, elliptic.P521(), "p521") @@ -214,5 +220,8 @@ func TestVectors(t *testing.T) { if Verify(&pub, hashed, r, s) != test.ok { t.Errorf("%d: bad result", i) } + if testing.Short() { + break + } } } -- cgit v1.1