mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
bytes, strings: rename field in CutSuffix tests
Change-Id: I63181f6540fc1bfcfc988a16bf9fafbd3575cfdf
GitHub-Last-Rev: d90528730a
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>
This commit is contained in:
parent
ae400d003f
commit
e590afcf2c
2 changed files with 6 additions and 6 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue