mirror of
https://github.com/TangentFoxy/lume.git
synced 2025-07-28 02:52:21 +00:00
Changed lume.shuffle() to not operate in-place, updated doc + tests
This commit is contained in:
@@ -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({}), {} )
|
||||
|
Reference in New Issue
Block a user