1
0
mirror of https://github.com/golang/go synced 2024-11-17 08:14:48 -07:00

time: fix FuzzFormatRFC3339 nano comparison

Change-Id: I13ed84b99459d5844abb6e932cc4b8e0bd3ae9f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/561215
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Jorropo 2024-02-05 01:22:58 +01:00 committed by Gopher Robot
parent 7c4ee1b165
commit dba518999d

View File

@ -1001,7 +1001,7 @@ func FuzzFormatRFC3339(f *testing.F) {
gotNanos := AppendFormatRFC3339(ts, nil, true)
wantNanos := AppendFormatAny(ts, nil, RFC3339Nano)
if !bytes.Equal(got, want) {
if !bytes.Equal(gotNanos, wantNanos) {
t.Errorf("Format(%s, RFC3339Nano) mismatch:\n\tgot: %s\n\twant: %s", ts, gotNanos, wantNanos)
}
})