From: Jorropo Date: Mon, 5 Feb 2024 00:22:58 +0000 (+0100) Subject: time: fix FuzzFormatRFC3339 nano comparison X-Git-Tag: go1.23rc1~1264 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=dba518999dfb7212f6fbc42d85dd303fcb78baad;p=gostls13.git time: fix FuzzFormatRFC3339 nano comparison Change-Id: I13ed84b99459d5844abb6e932cc4b8e0bd3ae9f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/561215 LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Reviewed-by: David Chase --- diff --git a/src/time/format_test.go b/src/time/format_test.go index 8a26eaa35b..29b9c280e6 100644 --- a/src/time/format_test.go +++ b/src/time/format_test.go @@ -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) } })