MCPcopy Create free account
hub / github.com/stretchr/testify / NotErrorAsf

Function NotErrorAsf

assert/assertion_format.go:626–631  ·  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

624// NotErrorAsf asserts that none of the errors in err's chain matches target,
625// but if so, sets target to that error value.
626func NotErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) bool {
627 if h, ok := t.(tHelper); ok {
628 h.Helper()
629 }
630 return NotErrorAs(t, err, target, append([]interface{}{msg}, args...)...)
631}
632
633// NotErrorIsf asserts that none of the errors in err's chain matches target.
634// 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