示例工程 09-sequences-and-sparse-arrays

09-sequences-and-sparse-arrays/03-zero-based-bug/_test.lua

lua · 0.3 KB

-- @runtimes lua54 luajit
local h = require("harness")
local m = require("main")
h.describe("0-based 错位", function()
	h.it("索引 0 是 nil", function()
		local r = m.run(function() end)
		h.eq(r.shifted_first, nil)
		h.eq(r.correct_first, "Ada")
	end)
end)
h.run()