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

Function NotZero

require/require.go:1829–1837  ·  view source on GitHub ↗

NotZero asserts that i is not the zero value for its type.

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

Source from the content-addressed store, hash-verified

1827
1828// NotZero asserts that i is not the zero value for its type.
1829func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) {
1830 if h, ok := t.(tHelper); ok {
1831 h.Helper()
1832 }
1833 if assert.NotZero(t, i, msgAndArgs...) {
1834 return
1835 }
1836 t.FailNow()
1837}
1838
1839// NotZerof asserts that i is not the zero value for its type.
1840func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) {

Callers 2

NotZeroMethod · 0.70
TestNotZeroFunction · 0.70

Calls 3

NotZeroFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by 1

TestNotZeroFunction · 0.56