示例工程 23-gc-and-weak-tables
23-gc-and-weak-tables/01-gc-count/_test.lua
-- @runtimes lua54 luajit
local h = require("harness")
local m = require("main")
h.describe("GC 计数", function()
h.it("分配上升,回收下降", function()
local r = m.run(function() end)
h.truthy(r.after_alloc > r.before)
h.truthy(r.after_collect < r.after_alloc)
end)
end)
h.run()