mirror of
https://github.com/wxd-gaming/test-all.git
synced 2026-06-03 17:22:51 +08:00
【优化】测试代码
This commit is contained in:
@@ -11,12 +11,17 @@ function t3(str)
|
||||
end
|
||||
|
||||
function testNow(map)
|
||||
argsTest(1, "3")
|
||||
print(" lua now - " .. ret(map))
|
||||
print(" lua now - " .. ret(map["now"]))
|
||||
print(" lua nowsec - " .. ret(map["nowsec"]))
|
||||
print("lua math.ceil - " .. ret(math.ceil(map["now"] / 1000)))
|
||||
end
|
||||
|
||||
function argsTest(...)
|
||||
gameDebug.assertTrue(1 == 2, "参数异常", ...)
|
||||
end
|
||||
|
||||
function ret(obj)
|
||||
local success, ret = pcall(function()
|
||||
return "dd - " .. obj
|
||||
|
||||
Reference in New Issue
Block a user