MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / TestListStructure_LPushs

Function TestListStructure_LPushs

structure/list_test.go:81–92  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

79}
80
81func TestListStructure_LPushs(t *testing.T) {
82 list, _ := initList()
83 defer list.db.Clean()
84
85 // Test LPushs function when the key exists
86 listErr = list.LPushs(string(randkv.GetTestKey(1)), 0, randkv.RandomValue(100), randkv.RandomValue(100))
87 assert.Nil(t, listErr)
88
89 // Test LPushs function when the key does not exist
90 listErr = list.LPushs(string(randkv.GetTestKey(2)), 0, randkv.RandomValue(100), randkv.RandomValue(100))
91 assert.Nil(t, listErr)
92}
93
94func TestListStructure_RPush(t *testing.T) {
95 list, _ := initList()

Callers

nothing calls this directly

Calls 5

GetTestKeyFunction · 0.92
RandomValueFunction · 0.92
initListFunction · 0.85
LPushsMethod · 0.65
CleanMethod · 0.45

Tested by

no test coverage detected