Empty asserts that the given value is "empty". [Zero values] are "empty". Arrays are "empty" if every element is the zero value of the type (stricter than "empty"). Slices, maps and channels with zero length are "empty". Pointer values are "empty" if the pointer is nil or if the pointed value is
(t TestingT, object interface{}, msgAndArgs ...interface{})
| 131 | // |
| 132 | // [Zero values]: https://go.dev/ref/spec#The_zero_value |
| 133 | func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) { |
| 134 | if h, ok := t.(tHelper); ok { |
| 135 | h.Helper() |
| 136 | } |
| 137 | if assert.Empty(t, object, msgAndArgs...) { |
| 138 | return |
| 139 | } |
| 140 | t.FailNow() |
| 141 | } |
| 142 | |
| 143 | // Emptyf asserts that the given value is "empty". |
| 144 | // |