MCPcopy
hub / github.com/expr-lang/expr / Errorf

Method Errorf

internal/testify/require/require_forward.go:306–311  ·  view source on GitHub ↗

Errorf asserts that a function returned an error (i.e. not `nil`). actualObj, err := SomeFunction() if a.Errorf(err, "error message %s", "formatted") { assert.Equal(t, expectedErrorf, err) }

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

Source from the content-addressed store, hash-verified

304// assert.Equal(t, expectedErrorf, err)
305// }
306func (a *Assertions) Errorf(err error, msg string, args ...interface{}) {
307 if h, ok := a.t.(tHelper); ok {
308 h.Helper()
309 }
310 Errorf(a.t, err, msg, args...)
311}
312
313// Eventually asserts that given condition will be met in waitFor time,
314// periodically checking target function each tick.

Callers

nothing calls this directly

Calls 2

ErrorfFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected