1
0
mirror of https://github.com/golang/go synced 2024-11-20 01:44:42 -07:00

asn1: fix incorrect prints found by govet

R=golang-dev
CC=golang-dev
https://golang.org/cl/5449063
This commit is contained in:
Robert Hencke 2011-12-02 10:13:02 -05:00 committed by Adam Langley
parent cf4acf80b4
commit 6f0ef845e6

View File

@ -225,19 +225,19 @@ func TestUTCTime(t *testing.T) {
ret, err := parseUTCTime([]byte(test.in)) ret, err := parseUTCTime([]byte(test.in))
if err != nil { if err != nil {
if test.ok { if test.ok {
t.Errorf("#%d: parseUTCTime(%q) = error %v", i, err) t.Errorf("#%d: parseUTCTime(%q) = error %v", i, test.in, err)
} }
continue continue
} }
if !test.ok { if !test.ok {
t.Errorf("#%d: parseUTCTime(%q) succeeded, should have failed", i) t.Errorf("#%d: parseUTCTime(%q) succeeded, should have failed", i, test.in)
continue continue
} }
const format = "Jan _2 15:04:05 -0700 2006" // ignore zone name, just offset const format = "Jan _2 15:04:05 -0700 2006" // ignore zone name, just offset
have := ret.Format(format) have := ret.Format(format)
want := test.out.Format(format) want := test.out.Format(format)
if have != want { if have != want {
t.Errorf("#%d: parseUTCTime(%q) = %s, want %s", test.in, have, want) t.Errorf("#%d: parseUTCTime(%q) = %s, want %s", i, test.in, have, want)
} }
} }
} }