Beispiel #1
0
func (tools *TestTools) assertFail(msg string, skip int) {
	tools.Printf(`----------------------------------
%s

%s----------------------------------
`, msg, kmgDebug.GetCurrentStack(skip).ToString())
	tools.TestingTB.FailNow()
}
Beispiel #2
0
func LogUserErrorWithStack(err error) {
	if err == nil {
		return
	}
	s := ""
	if err != nil {
		s = err.Error()
	}
	kmgLog.Log("userError", s, kmgDebug.GetCurrentStack(1))
}
Beispiel #3
0
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()
}