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

Function Nil

require/require.go:1341–1349  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

1339//
1340// require.Nil(t, err)
1341func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) {
1342 if h, ok := t.(tHelper); ok {
1343 h.Helper()
1344 }
1345 if assert.Nil(t, object, msgAndArgs...) {
1346 return
1347 }
1348 t.FailNow()
1349}
1350
1351// Nilf asserts that the specified object is nil.
1352//

Callers 2

NilMethod · 0.70
TestNilFunction · 0.70

Calls 3

NilFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by 1

TestNilFunction · 0.56