MCPcopy Index your code
hub / github.com/expr-lang/expr / Zero

Function Zero

internal/testify/assert/assertions.go:1667–1675  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

1665
1666// Zero asserts that i is the zero value for its type.
1667func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool {
1668 if h, ok := t.(tHelper); ok {
1669 h.Helper()
1670 }
1671 if i != nil && !reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) {
1672 return Fail(t, fmt.Sprintf("Should be zero, but was %v", i), msgAndArgs...)
1673 }
1674 return true
1675}
1676
1677// NotZero asserts that i is not the zero value for its type.
1678func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool {

Callers 4

ZeroFunction · 0.92
ZerofFunction · 0.70
TestZeroFunction · 0.70
ZeroMethod · 0.70

Calls 4

SprintfMethod · 0.80
FailFunction · 0.70
HelperMethod · 0.45
ZeroMethod · 0.45

Tested by 1

TestZeroFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…