blob: 1239d39e018de034ece713274232646c0e11b446 (
plain) (
tree)
|
|
package testhelpers
// Recurse calls itself 'depth' times then executes 'f'. Useful for testing things where stack size matters.
func Recurse(depth int, f func()) {
if depth > 0 {
depth--
Recurse(depth, f)
return
}
f()
}
|