mirror of
https://github.com/TangentFoxy/lume.git
synced 2024-11-19 07:04:24 +00:00
Added tests for lume.invert()
This commit is contained in:
parent
8a76fd7595
commit
2c71079ef3
@ -160,6 +160,14 @@ tests["lume.reduce"] = function()
|
||||
testeq( lume.reduce({}, concat, "potato"), "potato" )
|
||||
end
|
||||
|
||||
-- lume.invert
|
||||
tests["lume_invert"] = function()
|
||||
testeq( {}, {} )
|
||||
testeq( lume.invert{a = "x", b = "y"}, {x = "a", y = "b"} )
|
||||
testeq( lume.invert{a = 1, b = 2}, {"a", "b"} )
|
||||
testeq( lume.invert(lume.invert{a = 1, b = 2}), {a = 1, b = 2} )
|
||||
end
|
||||
|
||||
-- lume.set
|
||||
tests["lume.set"] = function()
|
||||
local t = lume.set({1, 2, 3, 2, 5, 6, 6})
|
||||
|
Loading…
Reference in New Issue
Block a user