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 assert.PanicTestFunc, msg string, args ...interface{})
| 1798 | // |
| 1799 | // assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") |
| 1800 | func PanicsWithValuef(t TestingT, expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) { |
| 1801 | if h, ok := t.(tHelper); ok { |
| 1802 | h.Helper() |
| 1803 | } |
| 1804 | if assert.PanicsWithValuef(t, expected, f, msg, args...) { |
| 1805 | return |
| 1806 | } |
| 1807 | t.FailNow() |
| 1808 | } |
| 1809 | |
| 1810 | // Panicsf asserts that the code inside the specified PanicTestFunc panics. |
| 1811 | // |
no test coverage detected
searching dependent graphs…