mirror of
https://github.com/golang/go
synced 2024-11-20 01:34:41 -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:
parent
cf4acf80b4
commit
6f0ef845e6
@ -225,19 +225,19 @@ func TestUTCTime(t *testing.T) {
|
||||
ret, err := parseUTCTime([]byte(test.in))
|
||||
if err != nil {
|
||||
if test.ok {
|
||||
t.Errorf("#%d: parseUTCTime(%q) = error %v", i, err)
|
||||
t.Errorf("#%d: parseUTCTime(%q) = error %v", i, test.in, err)
|
||||
}
|
||||
continue
|
||||
}
|
||||
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
|
||||
}
|
||||
const format = "Jan _2 15:04:05 -0700 2006" // ignore zone name, just offset
|
||||
have := ret.Format(format)
|
||||
want := test.out.Format(format)
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user