From f13dc59416afa8fc93bb3d784d1a73e49e1b5b09 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 7 Aug 2020 14:45:20 -0300 Subject: Better tests for gray lists Test uses an extra bit in 'marked' to mark all elements in gray lists and then check against elements colored gray. --- testes/nextvar.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'testes') diff --git a/testes/nextvar.lua b/testes/nextvar.lua index 73af77dd..a16d557b 100644 --- a/testes/nextvar.lua +++ b/testes/nextvar.lua @@ -88,6 +88,7 @@ for _, sa in ipairs(sizes) do -- 'sa' is size of the array part arr[1 + sa + sh + 1] = "}" local prog = table.concat(arr) local f = assert(load(prog)) + collectgarbage("stop") f() -- call once to ensure stack space -- make sure table is not resized after being created if sa == 0 or sh == 0 then @@ -97,6 +98,7 @@ for _, sa in ipairs(sizes) do -- 'sa' is size of the array part end local t = f() T.alloccount(); + collectgarbage("restart") assert(#t == sa) check(t, sa, mp2(sh)) end -- cgit v1.2.3-55-g6feb