1 // Copyright 2022 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
13 func TestAlloc(t *testing.T) {
15 t.Skip("skipping test in race mode")
17 testenv.SkipIfOptimizationOff(t)
18 got := int(testing.AllocsPerRun(5, func() {
21 b.WriteString("not 1K worth of bytes")
24 t.Errorf("got %d allocs, want 0", got)