示例工程 28-release-and-compat

28-release-and-compat/03-version-diff/_test.lua

lua · 0.3 KB

-- @runtimes lua54 luajit
local h = require("harness")
local m = require("main")
h.describe("版本差异", function()
	h.it("LuaJIT 有 bit 无整数", function()
		local r = m.run(function() end)
		if h.runtime() == "luajit" then
			h.eq(r.bit, true)
			h.eq(r.integer, false)
		else
			h.eq(r.integer, true)
		end
	end)
end)
h.run()