NotNil asserts that the specified object is not nil. require.NotNil(t, err)
(t TestingT, object interface{}, msgAndArgs ...interface{})
| 1679 | // |
| 1680 | // require.NotNil(t, err) |
| 1681 | func 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 | // |