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