mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
fix(slice): pass actual comparison indexes to DifferenceBy (#370)
This commit is contained in:
1 parent
59cd9bd06f
commit
34c7e36d29
2 files changed
+5
-2
No files matched your search
@@ -1205,6 +1205,9 @@ func TestDifferenceBy(t *testing.T) {
|
||||
}
|
||||
|
||||
assert.Equal([]int{1, 2}, DifferenceBy(s1, s2, addOne))
|
||||
assert.Equal([]int{}, DifferenceBy([]int{10, 10}, []int{10, 10}, func(i, v int) int {
|
||||
return i + v
|
||||
}))
|
||||
}
|
||||
|
||||
func TestIsAscending(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user