(tb testing.TB, i interface{}, args ...interface{})
| 223 | } |
| 224 | |
| 225 | func 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 | |
| 236 | func NotNil(tb testing.TB, i interface{}) { |
| 237 | if i == nil { |