[Haskell-cafe] HSpec vs Doctest for TDD

Michael Orlitzky michael at orlitzky.com
Thu Jun 26 13:27:09 UTC 2014


On 06/26/2014 03:10 AM, Erik Hesselink wrote:
>>
>> None of that helps if you write the wrong program. Your program may
>> typecheck, but if you're expecting "42" as output and your program hums
>> the Star Trek theme instead, the fact that it correctly does the wrong
>> thing won't be much consolation.
> 
> The same goes for any kind of testing, though. All these (writing the
> program, giving types for the program and testing the program) are
> different ways of specifying the same thing. The benefit from doing it
> twice in different ways, is that it's unlikely that you'll do it wrong
> twice *in the same way*.
> 
> Erik
> 

It guarantees that you've made an even number of mistakes =)



More information about the Haskell-Cafe mailing list