Added test for lume.combine() to test_lume.lua

This commit is contained in:
rxi 2014-04-03 20:10:08 +01:00
parent 82c697b08e
commit 8311519e3f

View File

@ -249,6 +249,16 @@ tests["lume.once"] = function()
testeq( f(5), nil )
end
-- lume.combine
tests["lume.combine"] = function()
local acc = 0
local a = function(x, y) acc = acc + x + y end
local b = function(x, y) acc = acc + x * y end
local fn = lume.combine(a, b)
fn(10, 20)
testeq( acc, 230 )
end
-- lume.time
tests["lume.time"] = function()
local t, a, b, c = lume.time(function(x) return 50, 60, x end, 70)