Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Vong (0.14 sec)

  1. src/bytes/buffer_test.go

    			readBytes, _ := buf.Read(tmp)
    			yBytes := Repeat(y, growLen)
    			allocs := testing.AllocsPerRun(100, func() {
    				buf.Grow(growLen)
    				buf.Write(yBytes)
    			})
    			// Check no allocation occurs in write, as long as we're single-threaded.
    			if allocs != 0 {
    				t.Errorf("allocation occurred during write")
    			}
    			// Check that buffer has correct data.
    			if !Equal(buf.Bytes()[0:startLen-readBytes], xBytes[readBytes:]) {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 20 01:07:29 GMT 2023
    - 18.1K bytes
    - Viewed (0)
Back to top