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

Function NotErrorIs

require/require.go:1588–1596  ·  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

1586// NotErrorIs asserts that none of the errors in err's chain matches target.
1587// This is a wrapper for errors.Is.
1588func NotErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{}) {
1589 if h, ok := t.(tHelper); ok {
1590 h.Helper()
1591 }
1592 if assert.NotErrorIs(t, err, target, msgAndArgs...) {
1593 return
1594 }
1595 t.FailNow()
1596}
1597
1598// NotErrorIsf asserts that none of the errors in err's chain matches target.
1599// 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