示例工程 15-index-and-newindex
15-index-and-newindex/03-proxy-with-pairs/_test.lua
-- @runtimes lua54
local h = require("harness")
local m = require("main")
h.describe("代理与 __pairs", function()
h.it("遍历代理背后数据", function()
local r = m.run(function() end)
h.eq(r.count, 2)
h.eq(r.first, 1)
end)
end)
h.run()