Changed lume.shuffle() to not operate in-place, updated doc + tests

This commit is contained in:
rxi
2015-01-10 16:21:57 +00:00
parent ac10d54b47
commit 4373a202dc
3 changed files with 9 additions and 5 deletions

View File

@@ -109,7 +109,7 @@ end
-- lume.shuffle
tests["lume.shuffle"] = function()
local t = {1, 2, 3, 4, 5}
lume.shuffle(t)
t = lume.shuffle(t)
table.sort(t)
testeq( t, {1, 2, 3, 4, 5} )
testeq( lume.shuffle({}), {} )