On 26 August 2011 14:54, Camillo Bruni <[email protected]> wrote:
> 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

Hi Camillo,

Indeed, partial continuations would make an excellent addition to
SUnit. Levente & I discussed doing do a short while back in
squeak-dev. Have you had a look at
http://www.squeaksource.com/Control.html by any chance? It implements
the shift/reset control operator, which is almost what Seaside uses.

frank

Reply via email to