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

Function NotErrorAs

require/require.go:1606–1614  ·  view source on GitHub ↗

NotErrorAs 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{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

1604// NotErrorAs asserts that none of the errors in err's chain matches target,
1605// but if so, sets target to that error value.
1606func NotErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) {
1607 if h, ok := t.(tHelper); ok {
1608 h.Helper()
1609 }
1610 if assert.NotErrorAs(t, err, target, msgAndArgs...) {
1611 return
1612 }
1613 t.FailNow()
1614}
1615
1616// NotErrorAsf asserts that none of the errors in err's chain matches target,
1617// but if so, sets target to that error value.

Callers 1

NotErrorAsMethod · 0.70

Calls 3

NotErrorAsFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected