mirror of
https://github.com/TangentFoxy/lume.git
synced 2025-07-28 02:52:21 +00:00
Added lume.ripairs() function, updated README and tests
This commit is contained in:
@@ -486,6 +486,18 @@ tests["lume.hotswap"] = function()
|
||||
testeq( type(err), "string" )
|
||||
end
|
||||
|
||||
-- lume.ripairs
|
||||
tests["lume.ripairs"] = function()
|
||||
local t = { "a", "b", "c" }
|
||||
local r = {}
|
||||
for i, v in lume.ripairs(t) do
|
||||
table.insert(r, { i, v })
|
||||
end
|
||||
testeq( r, { { 3, "c" }, { 2, "b" }, { 1, "a" } })
|
||||
for i, v in lume.ripairs(nil) do
|
||||
end
|
||||
end
|
||||
|
||||
-- lume.rgba
|
||||
tests["lume.rgba"] = function()
|
||||
local r, g, b, a = lume.rgba(0x12345678)
|
||||
|
Reference in New Issue
Block a user