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

Method Errorf

internal/testify/assert/assertion_forward.go:304–309  ·  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

302// assert.Equal(t, expectedErrorf, err)
303// }
304func (a *Assertions) Errorf(err error, msg string, args ...interface{}) bool {
305 if h, ok := a.t.(tHelper); ok {
306 h.Helper()
307 }
308 return Errorf(a.t, err, msg, args...)
309}
310
311// Eventually asserts that given condition will be met in waitFor time,
312// 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