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