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

Function TestIntPoolPoolReUse

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

Source from the content-addressed store, hash-verified

44}
45
46func 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}

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected