MCPcopy
hub / github.com/stretchr/testify / Errorf

Method Errorf

assert/assertion_forward.go:318–323  ·  view source on GitHub ↗

Errorf asserts that a function returned an error (i.e. not `nil`). actualObj, err := SomeFunction() a.Errorf(err, "error message %s", "formatted")

(err error, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

316// actualObj, err := SomeFunction()
317// a.Errorf(err, "error message %s", "formatted")
318func (a *Assertions) Errorf(err error, msg string, args ...interface{}) bool {
319 if h, ok := a.t.(tHelper); ok {
320 h.Helper()
321 }
322 return Errorf(a.t, err, msg, args...)
323}
324
325// Eventually asserts that given condition will be met in waitFor time,
326// periodically checking target function each tick.

Callers

nothing calls this directly

Calls 2

ErrorfFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected