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

Function Emptyf

require/require.go:156–164  ·  view source on GitHub ↗

Emptyf 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 i

(t TestingT, object interface{}, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

154//
155// [Zero values]: https://go.dev/ref/spec#The_zero_value
156func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) {
157 if h, ok := t.(tHelper); ok {
158 h.Helper()
159 }
160 if assert.Emptyf(t, object, msg, args...) {
161 return
162 }
163 t.FailNow()
164}
165
166// Equal asserts that two objects are equal.
167//

Callers 1

EmptyfMethod · 0.70

Calls 3

EmptyfFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected