mirror of
https://github.com/go-task/task.git
synced 2026-06-29 07:34:18 +00:00
chore(deps): upgrade x/exp/slices (#1462)
This commit is contained in:
@@ -42,8 +42,14 @@ func TestSortFunc(t *testing.T) {
|
||||
om.Set(3, "three")
|
||||
om.Set(1, "one")
|
||||
om.Set(2, "two")
|
||||
om.SortFunc(func(i, j int) bool {
|
||||
return i > j
|
||||
om.SortFunc(func(a, b int) int {
|
||||
if a < b {
|
||||
return 1
|
||||
}
|
||||
if a > b {
|
||||
return -1
|
||||
}
|
||||
return 0
|
||||
})
|
||||
assert.Equal(t, []int{3, 2, 1}, om.s)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user