示例工程 12-iterators

12-iterators/03-delete-while-iterating/_test.lua

lua · 0.2 KB

-- @runtimes lua54 luajit
local h = require("harness")
local m = require("main")
h.describe("遍历中删除", function()
	h.it("倒序删除保持正确", function()
		local r = m.run(function() end)
		h.eq(r.remaining, { 1, 3, 5 })
	end)
end)
h.run()