mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-12 00:32:27 +08:00
feat: add Shuffle func
This commit is contained in:
@@ -559,3 +559,13 @@ func TestWithout(t *testing.T) {
|
||||
t.FailNow()
|
||||
}
|
||||
}
|
||||
|
||||
func TestShuffle(t *testing.T) {
|
||||
s := []int{1, 2, 3, 4, 5}
|
||||
res := Shuffle(s)
|
||||
|
||||
if reflect.TypeOf(s) != reflect.TypeOf(res) {
|
||||
internal.LogFailedTestInfo(t, "Shuffle", s, res, res)
|
||||
t.FailNow()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user