mirror of
https://github.com/TangentFoxy/lume.git
synced 2025-07-28 11:02:20 +00:00
Added tests for lume.invert()
This commit is contained in:
@@ -160,6 +160,14 @@ tests["lume.reduce"] = function()
|
|||||||
testeq( lume.reduce({}, concat, "potato"), "potato" )
|
testeq( lume.reduce({}, concat, "potato"), "potato" )
|
||||||
end
|
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
|
-- lume.set
|
||||||
tests["lume.set"] = function()
|
tests["lume.set"] = function()
|
||||||
local t = lume.set({1, 2, 3, 2, 5, 6, 6})
|
local t = lume.set({1, 2, 3, 2, 5, 6, 6})
|
||||||
|
Reference in New Issue
Block a user