Fix tests failing on O2

This commit is contained in:
aaron 2023-08-29 23:15:37 +01:00
parent 6c1425701e
commit 92dca4fa1c

View file

@ -1039,11 +1039,13 @@ TEST("indexes()", function()
local count = table.create(3, 0) local count = table.create(3, 0)
local unrelated_count = 0 local unrelated_count = 0
local function unrelated() local unrelated = (function()
return function()
cleanup(function() cleanup(function()
unrelated_count += 1 unrelated_count += 1
end) end)
end end
end)()
local output = indexes(input, function(v, i) local output = indexes(input, function(v, i)
-- check that overriden cleanup scopes don't affect cleanup calls -- check that overriden cleanup scopes don't affect cleanup calls
@ -1165,11 +1167,13 @@ TEST("values()", function()
local count = table.create(3, 0) local count = table.create(3, 0)
local unrelated_count = 0 local unrelated_count = 0
local function unrelated() local unrelated = (function()
return function()
cleanup(function() cleanup(function()
unrelated_count += 1 unrelated_count += 1
end) end)
end end
end)()
local output = values(input, function(v, i) local output = values(input, function(v, i)
-- check that overriden cleanup scopes don't affect cleanup calls -- check that overriden cleanup scopes don't affect cleanup calls