diff options
| author | ruki <[email protected]> | 2019-08-19 23:51:01 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-08-19 17:06:08 +0800 |
| commit | 612dd5918297120bc7f0c2011fbbce90863fafaa (patch) | |
| tree | a10d62c193cfd6d947f6d785f1d9ec284a4b4e12 /tests/test_utils/check.lua | |
| parent | 18287b32f18272b58a214bdf3870a534f1800e8c (diff) | |
fix typos
Diffstat (limited to 'tests/test_utils/check.lua')
| -rw-r--r-- | tests/test_utils/check.lua | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/test_utils/check.lua b/tests/test_utils/check.lua index 86fa5d6b5..1dd25bbf0 100644 --- a/tests/test_utils/check.lua +++ b/tests/test_utils/check.lua @@ -12,23 +12,23 @@ function _get_rep(value) return tostring(value) end -function same(actual, expacted) - if actual ~= actual and expacted ~= expacted then - return true, _get_rep(actual), _get_rep(expacted) +function same(actual, expected) + if actual ~= actual and expected ~= expected then + return true, _get_rep(actual), _get_rep(expected) end - return actual == expacted, _get_rep(actual), _get_rep(expacted) + return actual == expected, _get_rep(actual), _get_rep(expected) end -function equal(actual, expacted) - local same, ap, ep = same(actual, expacted) +function equal(actual, expected) + local same, ap, ep = same(actual, expected) if same then return true, ap, ep end - if type(expacted) == "table" and type(actual) == "table" then + if type(expected) == "table" and type(actual) == "table" then local al = _tablelength(actual) - local el = _tablelength(expacted) + local el = _tablelength(expected) if al ~= el then return false, vformat("{...(%d elements)}", al), vformat("{...(%d elements)}", el) end - for k, v in pairs(expacted) do + for k, v in pairs(expected) do local av = actual[k] local eq, app, epp = equal(av, v) if not eq then |
