func (s *Assert) FailIf(check bool, messages ...interface{}) { if check { if len(messages) == 0 { messages = append(messages, "failed!") } o := []string{} for _, m := range messages { o = append(o, fmt.Sprint(m)) } tskip.Error(s.t, s.skip+1, strings.Join(o, " ")) s.t.FailNow() } }
func failIf(t *testing.T, check bool, messages ...interface{}) { if check { if len(messages) == 0 { messages = append(messages, "failed!") } o := []string{} for _, m := range messages { o = append(o, fmt.Sprint(m)) } tskip.Error(t, 1, strings.Join(o, " ")) t.FailNow() } }