One clue might be that what Eliot wants to do is probably not a unit test.<br><br><div class="gmail_quote">On Sat, Sep 12, 2009 at 2:22 PM, Colin Putney <span dir="ltr">&lt;<a href="mailto:cputney@wiresong.ca">cputney@wiresong.ca</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br>
On 10-Sep-09, at 1:52 PM, Eliot Miranda wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
<br>
    if I want to run through a complex test that tests a number of combinations, some of which have failures, its convenient to wrap the test in an exception handler for TestFailure and run the tests resuming on each failure.  But I can&#39;t because TestFaiure isn&#39;t resumable.  Any good reason why?<br>

<br>
e.g. I&#39;m currently testing the generation of a divide/remainder routine for the x86 where I&#39;m enumerating over many combinations of register quads, dividend, divisor, quotient, remainder, and I&#39;d like to do the following to count how many failures I&#39;m getting with each tweak of the register juggling code:<br>

</blockquote>
<br></div>
Well, SUnit wasn&#39;t designed to be used that way. Each test is supposed to have a binary result. Either it passes, or it doesn&#39;t. Sometimes the UI distinguishes between an assertion failing and an error, but that&#39;s sort of incidental. So TestFailure isn&#39;t resumable because we already have a result for the test: it failed. There&#39;s no need to continue executing the test, because further failures don&#39;t give any new information. In fact, further assertions are meaningless - we already know that *something* isn&#39;t as it should be. If further assertions fail, does that indicate additional problems, or the same one manifesting its self in different ways?<br>

<br>
The &quot;proper&quot; way to do this in SUnit would be to have a whole bunch of different tests that run the same code with different inputs. That&#39;s probably not practical.  A better way would be to write your own test harness. SUnit is great, but it&#39;s not the last word on testing, right?<br>
<font color="#888888">
<br>
Colin<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Ron<br>