1
0
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:
dudaodong
2022-01-01 19:18:33 +08:00
parent 042a00296f
commit ed4acc1c67
2 changed files with 24 additions and 0 deletions

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()
}
}