PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that the recovered panic value equals the expected panic value. assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() })
(t TestingT, expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{})
| 1784 | // |
| 1785 | // assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() }) |
| 1786 | func PanicsWithValue(t TestingT, expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) { |
| 1787 | if h, ok := t.(tHelper); ok { |
| 1788 | h.Helper() |
| 1789 | } |
| 1790 | if assert.PanicsWithValue(t, expected, f, msgAndArgs...) { |
| 1791 | return |
| 1792 | } |
| 1793 | t.FailNow() |
| 1794 | } |
| 1795 | |
| 1796 | // PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that |
| 1797 | // the recovered panic value equals the expected panic value. |
no test coverage detected
searching dependent graphs…