aboutsummaryrefslogtreecommitdiff
path: root/src/bytes/buffer_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/bytes/buffer_test.go')
-rw-r--r--src/bytes/buffer_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bytes/buffer_test.go b/src/bytes/buffer_test.go
index 322e7367c7..3c964fc6b9 100644
--- a/src/bytes/buffer_test.go
+++ b/src/bytes/buffer_test.go
@@ -7,6 +7,7 @@ package bytes_test
import (
. "bytes"
"fmt"
+ "internal/testenv"
"io"
"math/rand"
"strconv"
@@ -100,6 +101,7 @@ var buf Buffer
// should not result in any allocations.
// This can be used to reset the underlying []byte of an existing Buffer.
func TestNewBufferShallow(t *testing.T) {
+ testenv.SkipIfOptimizationOff(t)
n := testing.AllocsPerRun(1000, func() {
buf = *NewBuffer(testBytes)
})