aboutsummaryrefslogtreecommitdiff
path: root/src/strings
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2019-10-31 20:13:50 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2019-10-31 20:45:40 +0000
commitd6f2f833c93a41ec1c68e49804b8387a06b131c5 (patch)
treedd377269815e8b6a57c2d08fea2194073791656f /src/strings
parent48c0cef6dc9e7c95edaffb261250f99732686466 (diff)
downloadgo-d6f2f833c93a41ec1c68e49804b8387a06b131c5.tar.gz
go-d6f2f833c93a41ec1c68e49804b8387a06b131c5.zip
strings: remove a redundant and flaky part of a test
Fixes #35280 Change-Id: I6fa3747ff7b92c6fcabdf8692d85e103de55859f Reviewed-on: https://go-review.googlesource.com/c/go/+/204598 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/strings')
-rw-r--r--src/strings/builder_test.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/strings/builder_test.go b/src/strings/builder_test.go
index 9e597015d8..b662efe7a5 100644
--- a/src/strings/builder_test.go
+++ b/src/strings/builder_test.go
@@ -178,21 +178,6 @@ func TestBuilderWriteByte(t *testing.T) {
}
func TestBuilderAllocs(t *testing.T) {
- var b Builder
- const msg = "hello"
- b.Grow(len(msg) * 2) // because AllocsPerRun does an extra "warm-up" iteration
- var s string
- allocs := int(testing.AllocsPerRun(1, func() {
- b.WriteString("hello")
- s = b.String()
- }))
- if want := msg + msg; s != want {
- t.Errorf("String: got %#q; want %#q", s, want)
- }
- if allocs > 0 {
- t.Fatalf("got %d alloc(s); want 0", allocs)
- }
-
// Issue 23382; verify that copyCheck doesn't force the
// Builder to escape and be heap allocated.
n := testing.AllocsPerRun(10000, func() {