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

Function NotNil

require/require.go:1681–1689  ·  view source on GitHub ↗

NotNil asserts that the specified object is not nil. require.NotNil(t, err)

(t TestingT, object interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

1679//
1680// require.NotNil(t, err)
1681func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) {
1682 if h, ok := t.(tHelper); ok {
1683 h.Helper()
1684 }
1685 if assert.NotNil(t, object, msgAndArgs...) {
1686 return
1687 }
1688 t.FailNow()
1689}
1690
1691// NotNilf asserts that the specified object is not nil.
1692//

Callers 2

NotNilMethod · 0.70
TestNotNilFunction · 0.70

Calls 3

NotNilFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by 1

TestNotNilFunction · 0.56