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{})
| 1169 | // assert.Equal(t, "two", obj[1]) |
| 1170 | // } |
| 1171 | func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool { |
| 1172 | if h, ok := a.t.(tHelper); ok { |
| 1173 | h.Helper() |
| 1174 | } |
| 1175 | return NotEmpty(a.t, object, msgAndArgs...) |
| 1176 | } |
| 1177 | |
| 1178 | // NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either |
| 1179 | // a slice or a channel with len == 0. |