Nil asserts that the specified object is nil. assert.Nil(t, err)
(t TestingT, object interface{}, msgAndArgs ...interface{})
| 737 | // |
| 738 | // assert.Nil(t, err) |
| 739 | func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { |
| 740 | if isNil(object) { |
| 741 | return true |
| 742 | } |
| 743 | if h, ok := t.(tHelper); ok { |
| 744 | h.Helper() |
| 745 | } |
| 746 | return Fail(t, fmt.Sprintf("Expected nil, but got: %#v", object), msgAndArgs...) |
| 747 | } |
| 748 | |
| 749 | // isEmpty gets whether the specified object is considered empty or not. |
| 750 | func isEmpty(object interface{}) bool { |