(t *testing.T)
| 44 | } |
| 45 | |
| 46 | func TestIntPoolPoolReUse(t *testing.T) { |
| 47 | poolOfIntPools.pools = make([]*intPool, 0, poolDefaultCap) |
| 48 | nip := poolOfIntPools.get() |
| 49 | poolOfIntPools.put(nip) |
| 50 | poolOfIntPools.get() |
| 51 | |
| 52 | if len(poolOfIntPools.pools) != 0 { |
| 53 | t.Fatalf("Invalid number of pools. Got %d, expected %d", len(poolOfIntPools.pools), 0) |
| 54 | } |
| 55 | } |