示例工程 22-scheduling-and-tasks
22-scheduling-and-tasks/02-cancel-and-timeout/_test.lua
-- @runtimes lua54 luajit
local h = require("harness")
local m = require("main")
h.describe("取消任务", function()
h.it("达到 3 tick 后取消", function()
local r = m.run(function() end)
h.eq(r.ticks, 3)
h.eq(r.stopped, true)
end)
end)
h.run()