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

Method Zero

assert/assertion_forward.go:1710–1715  ·  view source on GitHub ↗

Zero asserts that i is the zero value for its type.

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

Source from the content-addressed store, hash-verified

1708
1709// Zero asserts that i is the zero value for its type.
1710func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) bool {
1711 if h, ok := a.t.(tHelper); ok {
1712 h.Helper()
1713 }
1714 return Zero(a.t, i, msgAndArgs...)
1715}
1716
1717// Zerof asserts that i is the zero value for its type.
1718func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) bool {

Callers 5

TestZeroWrapperFunction · 0.45
PositiveFunction · 0.45
NegativeFunction · 0.45
ZeroFunction · 0.45
NotZeroFunction · 0.45

Calls 2

ZeroFunction · 0.70
HelperMethod · 0.65

Tested by 1

TestZeroWrapperFunction · 0.36