- Sort Score
- Num 10 results
- Language All
Results 1 - 4 of 4 for AllocsPerRun (0.06 seconds)
-
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) }
Created: Tue Dec 30 11:13:12 GMT 2025 - Last Modified: Fri Nov 14 19:01:17 GMT 2025 - 19.4K bytes - Click Count (0) -
src/bytes/bytes_test.go
var dots = "1....2....3....4" type BinOpTest struct { a string b string i int } func TestEqual(t *testing.T) { // Run the tests and check for allocation at the same time. allocs := testing.AllocsPerRun(10, func() { for _, tt := range compareTests { eql := Equal(tt.a, tt.b) if eql != (tt.i == 0) { t.Errorf(`Equal(%q, %q) = %v`, tt.a, tt.b, eql) } } }) if allocs > 0 {Created: Tue Dec 30 11:13:12 GMT 2025 - Last Modified: Tue Dec 23 23:54:14 GMT 2025 - 62.9K bytes - Click Count (0) -
src/bufio/bufio_test.go
Created: Tue Dec 30 11:13:12 GMT 2025 - Last Modified: Fri Feb 07 01:08:54 GMT 2025 - 51.6K bytes - Click Count (0) -
api/go1.1.txt
pkg syscall, type RawSockaddrInet6 struct, Flowinfo uint32 pkg syscall, type RawSockaddrInet6 struct, Port uint16 pkg syscall, type RawSockaddrInet6 struct, Scope_id uint32 pkg testing, func AllocsPerRun(int, func()) float64 pkg testing, func Verbose() bool pkg testing, method (*B) ReportAllocs() pkg testing, method (*B) Skip(...interface{}) pkg testing, method (*B) SkipNow()
Created: Tue Dec 30 11:13:12 GMT 2025 - Last Modified: Thu Mar 31 20:37:15 GMT 2022 - 2.6M bytes - Click Count (0)