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

Function NotErrorIs

require/require.go:1630–1638  ·  view source on GitHub ↗

NotErrorIs asserts that none of the errors in err's chain matches target. This is a wrapper for errors.Is.

(t TestingT, err error, target error, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

1628// NotErrorIs asserts that none of the errors in err's chain matches target.
1629// This is a wrapper for errors.Is.
1630func NotErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{}) {
1631 if h, ok := t.(tHelper); ok {
1632 h.Helper()
1633 }
1634 if assert.NotErrorIs(t, err, target, msgAndArgs...) {
1635 return
1636 }
1637 t.FailNow()
1638}
1639
1640// NotErrorIsf asserts that none of the errors in err's chain matches target.
1641// This is a wrapper for errors.Is.

Callers 1

NotErrorIsMethod · 0.70

Calls 3

NotErrorIsFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected