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

Function NotEmpty

require/require.go:1521–1529  ·  view source on GitHub ↗

NotEmpty asserts that the specified object is NOT [Empty]. if require.NotEmpty(t, obj) { require.Equal(t, "two", obj[1]) }

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

Source from the content-addressed store, hash-verified

1519// require.Equal(t, "two", obj[1])
1520// }
1521func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) {
1522 if h, ok := t.(tHelper); ok {
1523 h.Helper()
1524 }
1525 if assert.NotEmpty(t, object, msgAndArgs...) {
1526 return
1527 }
1528 t.FailNow()
1529}
1530
1531// NotEmptyf asserts that the specified object is NOT [Empty].
1532//

Callers 3

TestSuiteLoggingFunction · 0.92
NotEmptyMethod · 0.70
TestNotEmptyFunction · 0.70

Calls 3

NotEmptyFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by 2

TestSuiteLoggingFunction · 0.74
TestNotEmptyFunction · 0.56