MCPcopy Create free account
hub / github.com/djherbis/buffer / TestPoolAt

Function TestPoolAt

buffer_test.go:808–816  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

806}
807
808func TestPoolAt(t *testing.T) {
809 pool := NewPoolAt(func() BufferAt { return New(10) })
810 buf, err := pool.Get()
811 if err != nil {
812 t.Error(err)
813 }
814 buf.Write([]byte("hello world"))
815 pool.Put(buf)
816}
817
818func TestMemPoolAt(t *testing.T) {
819 p := NewMemPoolAt(10)

Callers

nothing calls this directly

Calls 5

GetMethod · 0.95
PutMethod · 0.95
NewPoolAtFunction · 0.85
NewFunction · 0.85
WriteMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…