与“测试”相关
testing.assertEmpty() 函数
testing.assertEmpty() 测试输入流是否为空。如果不为空,则该函数返回一个错误。
testing.assertEquals() 函数
testing.assertEquals() 测试两个表流是否相同。
testing.assertEqualValues() 函数
testing.assertEqualValues() 测试两个值是否相等。
testing.diff() 函数
testing.diff() 生成两个流之间的差异。
testing.shouldError() 函数
testing.shouldError() 调用一个捕获任何错误并检查错误是否与预期值匹配的函数。
types.isNumeric() 函数
types.isNumeric() 检测一个值是否为数字类型(整型、无符号整型或浮点型)。
types.isType() 函数
types.isType() 测试一个值是否是指定的类型。
dynamic.isType() 函数
dynamic.isType() 测试动态类型是否包含指定类型的值。
testing.assertMatches() 函数
testing.assertMatches() 测试一个字符串是否匹配给定的正则表达式。
testing.shouldErrorWithCode() function
testing.shouldErrorWithCode() 调用一个捕捉任何错误并检查错误是否与预期值匹配的函数。