MCPcopy
hub / github.com/etcd-io/bbolt / TestFreelist_free_freelist

Function TestFreelist_free_freelist

internal/freelist/freelist_test.go:61–67  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

59}
60
61func TestFreelist_free_freelist(t *testing.T) {
62 f := newTestFreelist()
63 f.Free(100, common.NewPage(12, common.FreelistPageFlag, 0, 0))
64 pp := f.pendingPageIds()[100]
65 require.Equal(t, []common.Pgid{12}, pp.ids)
66 require.Equal(t, []common.Txid{0}, pp.alloctx)
67}
68
69func TestFreelist_free_freelist_alloctx(t *testing.T) {
70 f := newTestFreelist()

Callers

nothing calls this directly

Calls 4

NewPageFunction · 0.92
newTestFreelistFunction · 0.85
FreeMethod · 0.65
pendingPageIdsMethod · 0.65

Tested by

no test coverage detected