NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either a slice or a channel with len == 0. if a.NotEmpty(obj) { assert.Equal(t, "two", obj[1]) }
(object interface{}, msgAndArgs ...interface{})
| 1135 | // assert.Equal(t, "two", obj[1]) |
| 1136 | // } |
| 1137 | func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool { |
| 1138 | if h, ok := a.t.(tHelper); ok { |
| 1139 | h.Helper() |
| 1140 | } |
| 1141 | return NotEmpty(a.t, object, msgAndArgs...) |
| 1142 | } |
| 1143 | |
| 1144 | // NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either |
| 1145 | // a slice or a channel with len == 0. |