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

Function TestNotNilWrapper

assert/forward_assertions_test.go:69–81  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

67}
68
69func TestNotNilWrapper(t *testing.T) {
70 t.Parallel()
71
72 assert := New(new(testing.T))
73
74 if !assert.NotNil(new(AssertionTesterConformingObject)) {
75 t.Error("NotNil should return true: object is not nil")
76 }
77 if assert.NotNil(nil) {
78 t.Error("NotNil should return false: object is nil")
79 }
80
81}
82
83func TestNilWrapper(t *testing.T) {
84 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
NotNilMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected