<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 27, 2012 at 2:22 PM, Henning Thielemann <span dir="ltr">&lt;<a href="mailto:lemming@henning-thielemann.de" target="_blank">lemming@henning-thielemann.de</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 Tue, 27 Nov 2012, Michael Snoyman wrote:<br>
<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sure, in some cases that&#39;s true. The idea would be to structure the test case in such a way that we no with<br>
certainty which way it will fail. Simon&#39;s initial example will always fail in the same way.<br>
</blockquote>
<br></div>
The message for head of empty list may be changed without warning ...<br>
</blockquote></div><br></div><div class="gmail_extra">That argument can be applied to any form of automated testing.</div><div class="gmail_extra"><br></div><div class="gmail_extra">doSomething :: Int -&gt; Int</div><div class="gmail_extra">

<br></div><div class="gmail_extra">doSomething 5 `shouldBe` 6</div><div class="gmail_extra"><br></div><div class="gmail_extra">If the behavior of doSomething suddenly changes, then your test will fail. In fact, that&#39;s one of the *advantages* of having a test suite: it catches these kinds of unexpected changes.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">Michael</div></div>