Panics asserts that the code inside the specified PanicTestFunc panics. a.Panics(func(){ GoCrazy() })
(f PanicTestFunc, msgAndArgs ...interface{})
| 1372 | // |
| 1373 | // a.Panics(func(){ GoCrazy() }) |
| 1374 | func (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) bool { |
| 1375 | if h, ok := a.t.(tHelper); ok { |
| 1376 | h.Helper() |
| 1377 | } |
| 1378 | return Panics(a.t, f, msgAndArgs...) |
| 1379 | } |
| 1380 | |
| 1381 | // PanicsWithError asserts that the code inside the specified PanicTestFunc |
| 1382 | // panics, and that the recovered panic value is an error that satisfies the |