diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-01-26 20:20:12 -0800 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-01-26 20:20:38 -0800 |
| commit | 90c56d31352a0eeccd382ef5921baf3af4971040 (patch) | |
| tree | 5167eafb5785c94b48458b18b0454222ca70c749 /utils.lua | |
| parent | d5aa4e52983712f9f4c5b23528d0c2dab12b0b33 (diff) | |
Added a ton of tests for virtually all the functionality. Helped me find
and fix a lot of latent problems.
Diffstat (limited to 'utils.lua')
| -rw-r--r-- | utils.lua | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -284,7 +284,7 @@ local function sort(list, keyFn, reverse) end local function equivalent(x, y, depth) - depth = depth or 1 + depth = depth or -1 if x == y then return true end @@ -296,6 +296,8 @@ local function equivalent(x, y, depth) end if depth == 0 then return false + elseif depth < -999 then + error("Exceeded maximum comparison depth") end local checked = {} for k, v in pairs(x) do |
