diff options
| author | cuiweixie <cuiweixie@gmail.com> | 2022-09-04 19:18:50 +0800 |
|---|---|---|
| committer | Daniel Martà <mvdan@mvdan.cc> | 2022-09-07 07:03:10 +0000 |
| commit | ed530dbd077c8dbf680fabb1fb10da5239099e25 (patch) | |
| tree | 77eef2e44c8ca7827498582404dfe1088bda256b /src/testing/sub_test.go | |
| parent | f4bf9bceac20868fb692bacf02ee5b4ccd99b778 (diff) | |
| download | go-ed530dbd077c8dbf680fabb1fb10da5239099e25.tar.xz | |
testing: use strings.Builder
Change-Id: Ied8a3019f1e21c0e74c798d2b1b279a606a38554
Reviewed-on: https://go-review.googlesource.com/c/go/+/428279
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/testing/sub_test.go')
| -rw-r--r-- | src/testing/sub_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testing/sub_test.go b/src/testing/sub_test.go index bb1715b23f..6d8badfbf8 100644 --- a/src/testing/sub_test.go +++ b/src/testing/sub_test.go @@ -477,7 +477,7 @@ func TestTRun(t *T) { for _, tc := range testCases { t.Run(tc.desc, func(t *T) { ctx := newTestContext(tc.maxPar, newMatcher(regexp.MatchString, "", "")) - buf := &bytes.Buffer{} + buf := &strings.Builder{} root := &T{ common: common{ signal: make(chan bool), @@ -664,7 +664,7 @@ func TestBRun(t *T) { for _, tc := range testCases { t.Run(tc.desc, func(t *T) { var ok bool - buf := &bytes.Buffer{} + buf := &strings.Builder{} // This is almost like the Benchmark function, except that we override // the benchtime and catch the failure result of the subbenchmark. root := &B{ |
