(t *testing.T)
| 816 | } |
| 817 | |
| 818 | func 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 | |
| 836 | func poolAtTest(pool PoolAt, t *testing.T) { |
| 837 | buf, err := pool.Get() |
nothing calls this directly
no test coverage detected
searching dependent graphs…