(t *testing.T)
| 806 | } |
| 807 | |
| 808 | func 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 | |
| 818 | func TestMemPoolAt(t *testing.T) { |
| 819 | p := NewMemPoolAt(10) |