(t *testing.T)
| 191 | } |
| 192 | |
| 193 | func TestListStructure_LLen(t *testing.T) { |
| 194 | list, _ := initList() |
| 195 | defer list.db.Clean() |
| 196 | |
| 197 | // Test LLen function when the key exists |
| 198 | listErr = list.LPush(string(randkv.GetTestKey(1)), randkv.RandomValue(100), 0) |
| 199 | assert.Nil(t, listErr) |
| 200 | len, err := list.LLen(string(randkv.GetTestKey(1))) |
| 201 | assert.Nil(t, err) |
| 202 | assert.Equal(t, len, 1) |
| 203 | |
| 204 | // Test LLen function when the key does not exist |
| 205 | _, err = list.LLen(string(randkv.GetTestKey(2))) |
| 206 | assert.Equal(t, err, _const.ErrKeyNotFound) |
| 207 | } |
| 208 | |
| 209 | func TestListStructure_LRem(t *testing.T) { |
| 210 | list, _ := initList() |
nothing calls this directly
no test coverage detected