PanicsWithErrorf asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value is an error that satisfies the EqualError comparison. assert.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
(t TestingT, errString string, f PanicTestFunc, msg string, args ...interface{})
| 730 | // |
| 731 | // assert.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") |
| 732 | func PanicsWithErrorf(t TestingT, errString string, f PanicTestFunc, msg string, args ...interface{}) bool { |
| 733 | if h, ok := t.(tHelper); ok { |
| 734 | h.Helper() |
| 735 | } |
| 736 | return PanicsWithError(t, errString, f, append([]interface{}{msg}, args...)...) |
| 737 | } |
| 738 | |
| 739 | // PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that |
| 740 | // the recovered panic value equals the expected panic value. |
no test coverage detected