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

Function TestMemPoolAt

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

Source from the content-addressed store, hash-verified

816}
817
818func TestMemPoolAt(t *testing.T) {
819 p := NewMemPoolAt(10)
820 poolAtTest(p, t)
821
822 b := bytes.NewBuffer(nil)
823 enc := gob.NewEncoder(b)
824 if err := enc.Encode(&p); err != nil {
825 t.Error(err)
826 }
827
828 var pool PoolAt
829 dec := gob.NewDecoder(b)
830 if err := dec.Decode(&pool); err != nil {
831 t.Error(err)
832 }
833 poolAtTest(pool, t)
834}
835
836func poolAtTest(pool PoolAt, t *testing.T) {
837 buf, err := pool.Get()

Callers

nothing calls this directly

Calls 2

NewMemPoolAtFunction · 0.85
poolAtTestFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…