aboutsummaryrefslogtreecommitdiff
path: root/src/bytes
diff options
context:
space:
mode:
authorfangguizhen <1297394526@qq.com>2023-01-19 03:12:12 +0000
committerGopher Robot <gobot@golang.org>2023-01-20 01:25:45 +0000
commite590afcf2c2d046b1a4b6a11986a8e38a2b93ed7 (patch)
treed425a00f2ed61ed5333c704759c67b8462080df8 /src/bytes
parentae400d003fd5abdebee84b70cfbe5a8ee855e6cb (diff)
downloadgo-e590afcf2c2d046b1a4b6a11986a8e38a2b93ed7.tar.gz
go-e590afcf2c2d046b1a4b6a11986a8e38a2b93ed7.zip
bytes, strings: rename field in CutSuffix tests
Change-Id: I63181f6540fc1bfcfc988a16bf9fafbd3575cfdf GitHub-Last-Rev: d90528730a92a087866c1bfc227a0a0bf1cdffbe GitHub-Pull-Request: golang/go#57909 Reviewed-on: https://go-review.googlesource.com/c/go/+/462284 Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/bytes')
-rw-r--r--src/bytes/bytes_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bytes/bytes_test.go b/src/bytes/bytes_test.go
index f58f18c461..fc2824485a 100644
--- a/src/bytes/bytes_test.go
+++ b/src/bytes/bytes_test.go
@@ -1728,7 +1728,7 @@ func TestCutPrefix(t *testing.T) {
var cutSuffixTests = []struct {
s, sep string
- after string
+ before string
found bool
}{
{"abc", "bc", "a", true},
@@ -1741,8 +1741,8 @@ var cutSuffixTests = []struct {
func TestCutSuffix(t *testing.T) {
for _, tt := range cutSuffixTests {
- if after, found := CutSuffix([]byte(tt.s), []byte(tt.sep)); string(after) != tt.after || found != tt.found {
- t.Errorf("CutSuffix(%q, %q) = %q, %v, want %q, %v", tt.s, tt.sep, after, found, tt.after, tt.found)
+ if before, found := CutSuffix([]byte(tt.s), []byte(tt.sep)); string(before) != tt.before || found != tt.found {
+ t.Errorf("CutSuffix(%q, %q) = %q, %v, want %q, %v", tt.s, tt.sep, before, found, tt.before, tt.found)
}
}
}