Moved lume.invert()'s test func to match order in lume.lua

This commit is contained in:
rxi 2014-03-08 15:47:28 +00:00
parent 2f388bc2c7
commit 5e15a57f37

View File

@ -160,14 +160,6 @@ 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()
testeq( lume.set({}), {} )
@ -211,6 +203,14 @@ tests["lume.slice"] = function()
testeq( lume.slice({"a", "b", "c", "d", "e"}, 2, 1), {} )
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.clone
tests["lume.clone"] = function()
local t = {6, 7, 4, 5}