(t *testing.T)
| 72 | } |
| 73 | |
| 74 | func TestList_LPush(t *testing.T) { |
| 75 | for _, listImpl := range []data.ListImplementationType{data.ListImplDoublyLinkedList, data.ListImplBTree} { |
| 76 | list := data.NewList(listImpl) |
| 77 | // Test LPush |
| 78 | key := string(testutils.GetTestBytes(0)) |
| 79 | expectRecords := testutils.GenerateRecords(5) |
| 80 | seqInfo := data.HeadTailSeq{Head: data.InitialListSeq, Tail: data.InitialListSeq + 1} |
| 81 | |
| 82 | for i := 0; i < len(expectRecords); i++ { |
| 83 | seq := seqInfo.GenerateSeq(true) |
| 84 | newKey := utils.EncodeListKey([]byte(key), seq) |
| 85 | expectRecords[i].Key = newKey |
| 86 | ListPush(t, list, string(newKey), expectRecords[i], true, nil) |
| 87 | } |
| 88 | |
| 89 | ListCmp(t, list, key, expectRecords, true) |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | func TestList_RPush(t *testing.T) { |
| 94 | for _, listImpl := range []data.ListImplementationType{data.ListImplDoublyLinkedList, data.ListImplBTree} { |
nothing calls this directly
no test coverage detected