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

Function TestNotNil

internal/testify/assert/assertions_test.go:746–760  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

744}
745
746func TestNotNil(t *testing.T) {
747
748 mockT := new(testing.T)
749
750 if !NotNil(mockT, new(AssertionTesterConformingObject)) {
751 t.Error("NotNil should return true: object is not nil")
752 }
753 if NotNil(mockT, nil) {
754 t.Error("NotNil should return false: object is nil")
755 }
756 if NotNil(mockT, (*struct{})(nil)) {
757 t.Error("NotNil should return false: object is (*struct{})(nil)")
758 }
759
760}
761
762func TestNil(t *testing.T) {
763

Callers

nothing calls this directly

Calls 2

NotNilFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…