From: jjpinto Date: Tue, 23 Dec 2025 18:11:53 +0000 (+0000) Subject: bytes: improve consistency in split test messages X-Git-Url: https://git.feebdaed.xyz/?a=commitdiff_plain;h=a23d1a4ebe5ca1f4964ad51a92d99edf5a95d530;p=0xmirror%2Fgo.git bytes: improve consistency in split test messages This change improves consistency in the error messages used by TestSplit and TestSplitAfter in bytes_test.go Change-Id: Idc4e77a516037ce17cbb1bdffe3ac00bcde5de42 GitHub-Last-Rev: 8c4a35186851004251e8eee71c88ca1c822851c1 GitHub-Pull-Request: golang/go#76970 Reviewed-on: https://go-review.googlesource.com/c/go/+/732300 Reviewed-by: Michael Knyszek LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov Reviewed-by: Jorropo Auto-Submit: Jorropo --- diff --git a/src/bytes/bytes_test.go b/src/bytes/bytes_test.go index 9547ede312..891aef2c8b 100644 --- a/src/bytes/bytes_test.go +++ b/src/bytes/bytes_test.go @@ -961,7 +961,7 @@ func TestSplit(t *testing.T) { if tt.n < 0 { b := sliceOfString(Split([]byte(tt.s), []byte(tt.sep))) if !slices.Equal(result, b) { - t.Errorf("Split disagrees withSplitN(%q, %q, %d) = %v; want %v", tt.s, tt.sep, tt.n, b, a) + t.Errorf("Split disagrees with SplitN(%q, %q, %d) = %v; want %v", tt.s, tt.sep, tt.n, b, a) } } if len(a) > 0 { @@ -1023,7 +1023,7 @@ func TestSplitAfter(t *testing.T) { if tt.n < 0 { b := sliceOfString(SplitAfter([]byte(tt.s), []byte(tt.sep))) if !slices.Equal(result, b) { - t.Errorf("SplitAfter disagrees withSplitAfterN(%q, %q, %d) = %v; want %v", tt.s, tt.sep, tt.n, b, a) + t.Errorf("SplitAfter disagrees with SplitAfterN(%q, %q, %d) = %v; want %v", tt.s, tt.sep, tt.n, b, a) } } }