示例#1
0
文件: TestTools.go 项目: iizotop/kmg
func (tools *TestTools) assertFail(msg string, skip int) {
	tools.Printf(`----------------------------------
%s

%s----------------------------------
`, msg, kmgDebug.GetCurrentStack(skip).ToString())
	tools.TestingTB.FailNow()
}
示例#2
0
文件: error.go 项目: keysonZZZ/kmg
func LogUserErrorWithStack(err error) {
	if err == nil {
		return
	}
	s := ""
	if err != nil {
		s = err.Error()
	}
	kmgLog.Log("userError", s, kmgDebug.GetCurrentStack(1))
}
示例#3
0
文件: TestTools.go 项目: iizotop/kmg
func (tools *TestTools) Fatalf(format string, objs ...interface{}) {
	tools.Printf("\n%s\n\n%s\n", fmt.Sprintf(format, objs...),
		kmgDebug.GetCurrentStack(1).ToString())
	tools.TestingTB.FailNow()
}