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 assert.NotEmpty(t, obj) { assert.Equal(t, "two", obj[1]) }
(t TestingT, object interface{}, msgAndArgs ...interface{})
| 1437 | // assert.Equal(t, "two", obj[1]) |
| 1438 | // } |
| 1439 | func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) { |
| 1440 | if h, ok := t.(tHelper); ok { |
| 1441 | h.Helper() |
| 1442 | } |
| 1443 | if assert.NotEmpty(t, object, msgAndArgs...) { |
| 1444 | return |
| 1445 | } |
| 1446 | t.FailNow() |
| 1447 | } |
| 1448 | |
| 1449 | // NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either |
| 1450 | // a slice or a channel with len == 0. |
searching dependent graphs…