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{})
| 751 | // |
| 752 | // assert.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") |
| 753 | func PanicsWithErrorf(t TestingT, errString string, f PanicTestFunc, msg string, args ...interface{}) bool { |
| 754 | if h, ok := t.(tHelper); ok { |
| 755 | h.Helper() |
| 756 | } |
| 757 | return PanicsWithError(t, errString, f, append([]interface{}{msg}, args...)...) |
| 758 | } |
| 759 | |
| 760 | // PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that |
| 761 | // the recovered panic value equals the expected panic value. |
no test coverage detected