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

Function TestNilWrapper

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

Source from the content-addressed store, hash-verified

81}
82
83func TestNilWrapper(t *testing.T) {
84 t.Parallel()
85
86 assert := New(new(testing.T))
87
88 if !assert.Nil(nil) {
89 t.Error("Nil should return true: object is nil")
90 }
91 if assert.Nil(new(AssertionTesterConformingObject)) {
92 t.Error("Nil should return false: object is not nil")
93 }
94
95}
96
97func TestTrueWrapper(t *testing.T) {
98 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
NilMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected