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

Method Empty

require/require_forward.go:109–114  ·  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

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

Callers 1

TestEmptyWrapperFunction · 0.45

Calls 2

EmptyFunction · 0.70
HelperMethod · 0.65

Tested by 1

TestEmptyWrapperFunction · 0.36