MCPcopy
hub / github.com/stretchr/testify / Empty

Method Empty

assert/assertion_forward.go:108–113  ·  view source on GitHub ↗

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

(object interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

106//
107// [Zero values]: https://go.dev/ref/spec#The_zero_value
108func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool {
109 if h, ok := a.t.(tHelper); ok {
110 h.Helper()
111 }
112 return Empty(a.t, object, msgAndArgs...)
113}
114
115// Emptyf asserts that the given value is "empty".
116//

Callers 1

TestEmptyWrapperFunction · 0.45

Calls 2

EmptyFunction · 0.70
HelperMethod · 0.65

Tested by 1

TestEmptyWrapperFunction · 0.36