feat: add Shuffle func

This commit is contained in:
dudaodong committed 2022-01-01 19:18:33 +08:00
1 parent 042a00296f
commit ed4acc1c67
2 files changed
+24

No files matched your search

+10
View File
@@ -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()
}
}