Nil asserts that the specified object is nil. assert.Nil(t, err)
(t TestingT, object interface{}, msgAndArgs ...interface{})
| 703 | // |
| 704 | // assert.Nil(t, err) |
| 705 | func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { |
| 706 | if isNil(object) { |
| 707 | return true |
| 708 | } |
| 709 | if h, ok := t.(tHelper); ok { |
| 710 | h.Helper() |
| 711 | } |
| 712 | return Fail(t, fmt.Sprintf("Expected nil, but got: %#v", object), msgAndArgs...) |
| 713 | } |
| 714 | |
| 715 | // isEmpty gets whether the specified object is considered empty or not. |
| 716 | func isEmpty(object interface{}) bool { |