Proposal: Add Eq instance for Control.Exception.ErrorCall

Michael Snoyman michael at snoyman.com
Tue Nov 27 13:25:32 CET 2012


On Tue, Nov 27, 2012 at 2:22 PM, Henning Thielemann <
lemming at henning-thielemann.de> wrote:

>
> On Tue, 27 Nov 2012, Michael Snoyman wrote:
>
>  Sure, in some cases that's true. The idea would be to structure the test
>> case in such a way that we no with
>> certainty which way it will fail. Simon's initial example will always
>> fail in the same way.
>>
>
> The message for head of empty list may be changed without warning ...
>

That argument can be applied to any form of automated testing.

doSomething :: Int -> Int

doSomething 5 `shouldBe` 6

If the behavior of doSomething suddenly changes, then your test will fail.
In fact, that's one of the *advantages* of having a test suite: it catches
these kinds of unexpected changes.

Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20121127/2a1e0514/attachment.htm>


More information about the Libraries mailing list