mirror of
https://github.com/TangentFoxy/lume.git
synced 2025-07-28 02:52:21 +00:00
Changed lume.reduce() to support non-array tables, updated tests
This commit is contained in:
@@ -230,6 +230,9 @@ tests["lume.reduce"] = function()
|
||||
testeq( lume.reduce({1, 2, 3, 4}, add, 5), 15 )
|
||||
testeq( lume.reduce({1}, add), 1 )
|
||||
testeq( lume.reduce({}, concat, "potato"), "potato" )
|
||||
testeq( lume.reduce({a=1, b=2}, add, 5), 8 )
|
||||
testeq( lume.reduce({a=1, b=2}, add), 3 )
|
||||
tester.test.error(lume.reduce, {}, add)
|
||||
end
|
||||
|
||||
-- lume.set
|
||||
|
Reference in New Issue
Block a user