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

Function NotErrorAsf

require/require.go:1618–1626  ·  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

1616// NotErrorAsf asserts that none of the errors in err's chain matches target,
1617// but if so, sets target to that error value.
1618func NotErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) {
1619 if h, ok := t.(tHelper); ok {
1620 h.Helper()
1621 }
1622 if assert.NotErrorAsf(t, err, target, msg, args...) {
1623 return
1624 }
1625 t.FailNow()
1626}
1627
1628// NotErrorIs asserts that none of the errors in err's chain matches target.
1629// This is a wrapper for errors.Is.

Callers 1

NotErrorAsfMethod · 0.70

Calls 3

NotErrorAsfFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected