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

Function TestNotNilWrapper

require/forward_requirements_test.go:99–111  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

97}
98
99func TestNotNilWrapper(t *testing.T) {
100 t.Parallel()
101
102 require := New(t)
103 require.NotNil(t, new(AssertionTesterConformingObject))
104
105 mockT := new(MockT)
106 mockRequire := New(mockT)
107 mockRequire.NotNil(nil)
108 if !mockT.Failed {
109 t.Error("Check should fail")
110 }
111}
112
113func TestNilWrapper(t *testing.T) {
114 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
NotNilMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected