diff --git a/test/test_lume.lua b/test/test_lume.lua index 543696b..76beef5 100644 --- a/test/test_lume.lua +++ b/test/test_lume.lua @@ -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}