mirror of
https://github.com/TangentFoxy/lume.git
synced 2024-11-19 07:04:24 +00:00
Moved lume.invert()'s test func to match order in lume.lua
This commit is contained in:
parent
2f388bc2c7
commit
5e15a57f37
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user