mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-26 11:39:05 -05:00
Make compoundList.Remove convert return value to List not compoundList.
This commit is contained in:
@@ -212,7 +212,7 @@ func (cl compoundList) Remove(start uint64, end uint64) List {
|
||||
for i := start; i < end; i++ {
|
||||
seq.Skip()
|
||||
}
|
||||
return seq.Done().(compoundList)
|
||||
return seq.Done().(List)
|
||||
}
|
||||
|
||||
func (cl compoundList) RemoveAt(idx uint64) List {
|
||||
|
||||
@@ -440,6 +440,16 @@ func TestCompoundListRemoveNothing(t *testing.T) {
|
||||
assert.True(cl.Equals(cl.Remove(cl.Len(), cl.Len())))
|
||||
}
|
||||
|
||||
func TestCompoundListRemoveEverything(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
cs := chunks.NewMemoryStore()
|
||||
cl := getTestSimpleList().ToNomsList(cs).Remove(0, getTestSimpleListLen())
|
||||
|
||||
assert.True(NewList(cs).Equals(cl))
|
||||
assert.Equal(0, int(cl.Len()))
|
||||
}
|
||||
|
||||
func TestCompoundListRemoveAtMiddle(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user