recoverNoPanic runs fn and reports whether it returned without panicking.
(fn func())
| 139 | |
| 140 | // recoverNoPanic runs fn and reports whether it returned without panicking. |
| 141 | func recoverNoPanic(fn func()) (ok bool) { |
| 142 | defer func() { |
| 143 | if r := recover(); r != nil { |
| 144 | ok = false |
| 145 | } |
| 146 | }() |
| 147 | fn() |
| 148 | return true |
| 149 | } |
| 150 | |
| 151 | func assertInputUnchanged(t *testing.T, data []byte, fn func()) { |
| 152 | t.Helper() |
no outgoing calls
no test coverage detected