模块 lib.test.luaunit
通用实用函数
函数
Tables
| LuaUnit | LuaUnit 类 |
函数
- assertEquals (actual, expected, extra_msg_or_nil, doDeepAnalysis)
-
相等断言
参数:
- actual
- expected
- extra_msg_or_nil
- doDeepAnalysis
- assertStrContains (str, sub, isPattern, extra_msg_or_nil)
-
字符串断言
参数:
- str
- sub
- isPattern
- extra_msg_or_nil 这依赖于 lua string.find 函数,一个字符串总是包含空字符串
- assertEvalToTrue (value, extra_msg_or_nil)
-
类型断言
参数:
- value
- extra_msg_or_nil
- assertIsNaN (value, extra_msg_or_nil)
-
科学断言
参数:
- value
- extra_msg_or_nil