PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value equals the expected panic value. a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
(expected interface{}, f PanicTestFunc, msg string, args ...interface{})
| 1418 | // |
| 1419 | // a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") |
| 1420 | func (a *Assertions) PanicsWithValuef(expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool { |
| 1421 | if h, ok := a.t.(tHelper); ok { |
| 1422 | h.Helper() |
| 1423 | } |
| 1424 | return PanicsWithValuef(a.t, expected, f, msg, args...) |
| 1425 | } |
| 1426 | |
| 1427 | // Panicsf asserts that the code inside the specified PanicTestFunc panics. |
| 1428 | // |
nothing calls this directly
no test coverage detected