MCPcopy
hub / github.com/expr-lang/expr / NotEmpty

Method NotEmpty

internal/testify/assert/assertion_forward.go:1137–1142  ·  view source on GitHub ↗

NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either a slice or a channel with len == 0. if a.NotEmpty(obj) { assert.Equal(t, "two", obj[1]) }

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

Source from the content-addressed store, hash-verified

1135// assert.Equal(t, "two", obj[1])
1136// }
1137func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool {
1138 if h, ok := a.t.(tHelper); ok {
1139 h.Helper()
1140 }
1141 return NotEmpty(a.t, object, msgAndArgs...)
1142}
1143
1144// NotEmptyf asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either
1145// a slice or a channel with len == 0.

Callers 1

TestNotEmptyWrapperFunction · 0.45

Calls 2

NotEmptyFunction · 0.70
HelperMethod · 0.45

Tested by 1

TestNotEmptyWrapperFunction · 0.36