示例工程 17-oop-patterns

17-oop-patterns/01-colon-vs-dot/_test.lua

lua · 0.3 KB

-- @runtimes lua54 luajit
local h = require("harness")
local m = require("main")
h.describe("冒号与点号", function()
	h.it("冒号传 self,点号不传", function()
		local r = m.run(function() end)
		h.eq(r.colon, 7)
		h.eq(r.dot_ok, false)
	end)
end)
h.run()