Panic instead of calling a fail function
xetorthio opened this issue · comments
This a better approach to integrate with other testing frameworks, since it doesn't require any special function to be implemented by the testing framework.
I originally wanted to implement the failure handling as a panic. This was a non-starter though because a panic emitted in a goroutine cannot be rescued by the calling goroutine. There are certain important use cases (async tests, marchers in goroutines) where you may want to use a marcher in a goroutine.
With that said, if a testing framework requires a panic to signify failure it is a trivial thing to pass in a fail function to gomega that panics.
On Oct 16, 2013, at 10:18 PM, Jonathan Leibiusky notifications@github.com wrote:
This a better approach to integrate with other testing frameworks, since it doesn't require any special function to be implemented by the testing framework.
—
Reply to this email directly or view it on GitHub.