mirror of
https://github.com/TangentFoxy/lume.git
synced 2024-11-19 07:04:24 +00:00
Added test for lume.combine() to test_lume.lua
This commit is contained in:
parent
82c697b08e
commit
8311519e3f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user