(t *testing.T)
| 207 | } |
| 208 | |
| 209 | func TestListStructure_LRem(t *testing.T) { |
| 210 | list, _ := initList() |
| 211 | defer list.db.Clean() |
| 212 | |
| 213 | // Test LRem function when the key exists |
| 214 | listErr = list.LPush(string(randkv.GetTestKey(1)), randkv.RandomValue(100), 0) |
| 215 | assert.Nil(t, listErr) |
| 216 | listErr = list.LRem(string(randkv.GetTestKey(1)), 1, randkv.RandomValue(100)) |
| 217 | assert.Nil(t, listErr) |
| 218 | |
| 219 | // Test LRem function when the key does not exist |
| 220 | listErr = list.LRem(string(randkv.GetTestKey(2)), 1, randkv.RandomValue(100)) |
| 221 | assert.Equal(t, listErr, _const.ErrKeyNotFound) |
| 222 | } |
| 223 | |
| 224 | func TestListStructure_LSet(t *testing.T) { |
| 225 | list, _ := initList() |
nothing calls this directly
no test coverage detected