From: Christopher Wedgwood Date: Tue, 13 Dec 2011 19:40:28 +0000 (-0500) Subject: cypto/ocsp: fix tests X-Git-Tag: weekly.2011-12-14~53 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6f975fbb31d97606154b8e753389fb1410a91de6;p=gostls13.git cypto/ocsp: fix tests Actually compare the result with expected not itself R=agl, bradfitz CC=golang-dev, rsc https://golang.org/cl/5477079 --- diff --git a/src/pkg/crypto/ocsp/ocsp_test.go b/src/pkg/crypto/ocsp/ocsp_test.go index bacca558b4..49d8ea29b9 100644 --- a/src/pkg/crypto/ocsp/ocsp_test.go +++ b/src/pkg/crypto/ocsp/ocsp_test.go @@ -23,11 +23,11 @@ func TestOCSPDecode(t *testing.T) { NextUpdate: time.Date(2010, 7, 7, 18, 35, 17, 0, time.UTC), } - if !reflect.DeepEqual(resp.ThisUpdate, resp.ThisUpdate) { + if !reflect.DeepEqual(resp.ThisUpdate, expected.ThisUpdate) { t.Errorf("resp.ThisUpdate: got %d, want %d", resp.ThisUpdate, expected.ThisUpdate) } - if !reflect.DeepEqual(resp.NextUpdate, resp.NextUpdate) { + if !reflect.DeepEqual(resp.NextUpdate, expected.NextUpdate) { t.Errorf("resp.NextUpdate: got %d, want %d", resp.NextUpdate, expected.NextUpdate) }