mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
fix(slice): return safely when DeleteAt receives no elements (#381)
This commit is contained in:
1 parent
752f1ed63d
commit
eb3b1e33d2
2 files changed
+5
No files matched your search
@@ -801,6 +801,8 @@ func TestDeleteAt(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
assert := internal.NewAssert(t, "TestDeleteAt")
|
||||
assert.Equal(0, len(DeleteAt([]int(nil), 0)))
|
||||
assert.Equal(0, len(DeleteAt([]int{}, -1)))
|
||||
|
||||
tests := []struct {
|
||||
slice []int
|
||||
|
||||
Reference in new issue
Block a user