- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for SkipIfOptimizationOff (0.08 sec)
-
src/bytes/buffer_test.go
// 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) }) if n > 0 { t.Errorf("allocations occurred while shallow copying") } check(t, "NewBuffer", &buf, testString) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0)