MCPcopy Create free account
hub / github.com/CPChain/chain / TestIntPoolPoolPut

Function TestIntPoolPoolPut

core/vm/intpool_test.go:32–44  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30}
31
32func TestIntPoolPoolPut(t *testing.T) {
33 poolOfIntPools.pools = make([]*intPool, 0, poolDefaultCap)
34
35 nip := poolOfIntPools.get()
36 if len(poolOfIntPools.pools) != 0 {
37 t.Fatalf("Pool got added to list when none should have been")
38 }
39
40 poolOfIntPools.put(nip)
41 if len(poolOfIntPools.pools) == 0 {
42 t.Fatalf("Pool did not get added to list when one should have been")
43 }
44}
45
46func TestIntPoolPoolReUse(t *testing.T) {
47 poolOfIntPools.pools = make([]*intPool, 0, poolDefaultCap)

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected