aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-02-18 19:22:44 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-02-18 19:22:44 +0100
commit7973847d025aa7af431f1e92c1ee977ceb0eb7e5 (patch)
tree655024efab66b6851cf3f031473a7252f20eb367 /test/helpers.lua
parente72ecdb7ca1face1d16e622824aa7bd3c98f5673 (diff)
downloadrneovim-7973847d025aa7af431f1e92c1ee977ceb0eb7e5.tar.gz
rneovim-7973847d025aa7af431f1e92c1ee977ceb0eb7e5.tar.bz2
rneovim-7973847d025aa7af431f1e92c1ee977ceb0eb7e5.zip
test/util: remove eq_any()
It was added in the parent commit, but ended up not being used. And I can't think of a case where it will be used: instead we would probably want to generalize expect_msg_seq() if necessary.
Diffstat (limited to 'test/helpers.lua')
-rw-r--r--test/helpers.lua25
1 files changed, 2 insertions, 23 deletions
diff --git a/test/helpers.lua b/test/helpers.lua
index ee7dc5dfe5..91ceed4df1 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -10,28 +10,8 @@ local check_logs_useless_lines = {
local function eq(expected, actual)
return assert.are.same(expected, actual)
end
--- Tries multiple accepted ("expected") values until one succeeds.
--- First N-1 arguments are the accepted values.
--- Last (Nth) argument is the "actual" value to be compared.
-local function eq_any(...)
- if select('#', ...) < 2 then
- error('need at least 2 arguments')
- end
- local args = {...}
- local actual = args[#args]
- local final_error = ''
- for anum = 1, select('#', ...) - 1 do
- local accepted = args[anum]
- local status, result = pcall(eq, accepted, actual)
- if status then
- return result
- end
- final_error = final_error..tostring(result)
- end
- error(final_error)
-end
-local function neq(exp, act)
- return assert.are_not.same(exp, act)
+local function neq(expected, actual)
+ return assert.are_not.same(expected, actual)
end
local function ok(res)
return assert.is_true(res)
@@ -581,7 +561,6 @@ return {
deepcopy = deepcopy,
dictdiff = dictdiff,
eq = eq,
- eq_any = eq_any,
filter = filter,
fixtbl = fixtbl,
fixtbl_rec = fixtbl_rec,