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

Function NotErrorAsf

assert/assertion_format.go:644–649  ·  view source on GitHub ↗

NotErrorAsf asserts that none of the errors in err's chain matches target, but if so, sets target to that error value.

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

Source from the content-addressed store, hash-verified

642// NotErrorAsf asserts that none of the errors in err's chain matches target,
643// but if so, sets target to that error value.
644func NotErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) bool {
645 if h, ok := t.(tHelper); ok {
646 h.Helper()
647 }
648 return NotErrorAs(t, err, target, append([]interface{}{msg}, args...)...)
649}
650
651// NotErrorIsf asserts that none of the errors in err's chain matches target.
652// This is a wrapper for errors.Is.

Callers 2

NotErrorAsfFunction · 0.92
NotErrorAsfMethod · 0.70

Calls 2

NotErrorAsFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected