]> Cypherpunks repositories - gostls13.git/commitdiff
cypto/ocsp: fix tests
authorChristopher Wedgwood <cw@f00f.org>
Tue, 13 Dec 2011 19:40:28 +0000 (14:40 -0500)
committerAdam Langley <agl@golang.org>
Tue, 13 Dec 2011 19:40:28 +0000 (14:40 -0500)
Actually compare the result with expected not itself

R=agl, bradfitz
CC=golang-dev, rsc
https://golang.org/cl/5477079

src/pkg/crypto/ocsp/ocsp_test.go

index bacca558b48772addcec41e96b65cc783d0f3b08..49d8ea29b936288893970f6a7233ffa5bb5c6e7b 100644 (file)
@@ -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)
        }