Closed xpol closed 7 years ago
Is it possible to have array include test like follow?
assert.array(a).has(element) assert.array(a).inlcude(element) assert.array(a).has_element(element)
Currently I have to write a function include()
include()
local function include(t, element) for _, v in ipairs(t) do if v == element then return true end end return false end -- Then: -- ... assert.is_true(include(all, agent1))
see #145 for an example
Is it possible to have array include test like follow?
Currently I have to write a function
include()