]> git.feebdaed.xyz Git - 0xmirror/go.git/commitdiff
bytes: improve consistency in split test messages
authorjjpinto <jorgpinto@gmail.com>
Tue, 23 Dec 2025 18:11:53 +0000 (18:11 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 23 Dec 2025 23:54:14 +0000 (15:54 -0800)
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 <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>

src/bytes/bytes_test.go

index 9547ede312fc0fe6c73c399382f58773d0c7c722..891aef2c8b89960899f9d4735420bfd0b24e3aae 100644 (file)
@@ -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)
                        }
                }
        }