NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. require.NotPanics(t, func(){ RemainCalm() })
(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{})
| 1705 | // |
| 1706 | // require.NotPanics(t, func(){ RemainCalm() }) |
| 1707 | func NotPanics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) { |
| 1708 | if h, ok := t.(tHelper); ok { |
| 1709 | h.Helper() |
| 1710 | } |
| 1711 | if assert.NotPanics(t, f, msgAndArgs...) { |
| 1712 | return |
| 1713 | } |
| 1714 | t.FailNow() |
| 1715 | } |
| 1716 | |
| 1717 | // NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. |
| 1718 | // |
searching dependent graphs…