Helper to avoid direct calls to require in hot paths; in go 1.9 and later it becomes very expensive due to querying call stack context on every call.
(t *testing.T, condition bool, msgAndArgs ...interface{})
| 13 | // Helper to avoid direct calls to require in hot paths; in go 1.9 and later |
| 14 | // it becomes very expensive due to querying call stack context on every call. |
| 15 | func wrapRequire(t *testing.T, condition bool, msgAndArgs ...interface{}) { |
| 16 | if !condition { |
| 17 | require.Fail(t, "Fail", msgAndArgs...) |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | func asize(n int) int { |
| 22 | sz := n / 64 |
no outgoing calls
no test coverage detected