It always bugged me that SUnit has to rerun the tests again when you want to
debug them. So I made a little use-case where exceptions have an optional
continuation, so you can resume/debug them later on.
Here's a small example:
|e|
[ 0 / 0 ]
on: Error
do: [ :error| e := error freeze ].
e debug
freeze simply creates a continuation (at the moment a full one, but that could
be of course reduced to a partial one by the TestRunner). Now when you would
click on the failing test result you would simply have to activate the
corresponding error by sending #debug to it.
This would have a major advantage for non-deterministic tests (which of course
they should not be). Because in this case you're lost with the current SUnit
since the debug stack will differ from the actual test-run which produced the
error.
Needed Changes:
- Continuations (the one from Seaside will just do fine)
- Exception >> #freeze saving the continuation
- TestCase has to store the actual exception