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

Function Nil

internal/testify/assert/assertions.go:705–713  ·  view source on GitHub ↗

Nil asserts that the specified object is nil. assert.Nil(t, err)

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

Source from the content-addressed store, hash-verified

703//
704// assert.Nil(t, err)
705func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
706 if isNil(object) {
707 return true
708 }
709 if h, ok := t.(tHelper); ok {
710 h.Helper()
711 }
712 return Fail(t, fmt.Sprintf("Expected nil, but got: %#v", object), msgAndArgs...)
713}
714
715// isEmpty gets whether the specified object is considered empty or not.
716func isEmpty(object interface{}) bool {

Callers 11

TestExpr_calls_with_nilFunction · 0.92
TestIssue584Function · 0.92
TestDeref_nilFunction · 0.92
TestType_nilFunction · 0.92
TestValue_nil_in_chainFunction · 0.92
TestUnsafePointersFunction · 0.92
NilFunction · 0.92
NilfFunction · 0.70
TestNilFunction · 0.70
NilMethod · 0.70

Calls 4

isNilFunction · 0.85
SprintfMethod · 0.80
FailFunction · 0.70
HelperMethod · 0.45

Tested by 8

TestExpr_calls_with_nilFunction · 0.74
TestIssue584Function · 0.74
TestDeref_nilFunction · 0.74
TestType_nilFunction · 0.74
TestValue_nil_in_chainFunction · 0.74
TestUnsafePointersFunction · 0.74
TestNilFunction · 0.56