MCPcopy Create free account
hub / github.com/Percona-Lab/mysql_random_data_load / IsNil

Function IsNil

testutils/testutils.go:225–234  ·  view source on GitHub ↗
(tb testing.TB, i interface{}, args ...interface{})

Source from the content-addressed store, hash-verified

223}
224
225func IsNil(tb testing.TB, i interface{}, args ...interface{}) {
226 if i != nil {
227 msg := fmt.Sprintf("%s: expected nil, got %#v\n\n", caller(), i)
228 if len(args) > 0 {
229 msg = fmt.Sprintf("%s: %s "+args[0].(string), append([]interface{}{caller(), i}, args[1:]...)) + "\n"
230 }
231 fmt.Println(msg)
232 tb.FailNow()
233 }
234}
235
236func NotNil(tb testing.TB, i interface{}) {
237 if i == nil {

Callers

nothing calls this directly

Calls 1

callerFunction · 0.85

Tested by

no test coverage detected