PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value equals the expected panic value. assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
(t TestingT, expected interface{}, f PanicTestFunc, msg string, args ...interface{})
| 762 | // |
| 763 | // assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") |
| 764 | func PanicsWithValuef(t TestingT, expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool { |
| 765 | if h, ok := t.(tHelper); ok { |
| 766 | h.Helper() |
| 767 | } |
| 768 | return PanicsWithValue(t, expected, f, append([]interface{}{msg}, args...)...) |
| 769 | } |
| 770 | |
| 771 | // Positivef asserts that the specified element is positive |
| 772 | // |
no test coverage detected
searching dependent graphs…