[Haskell-cafe] Unit testing in Haskell

Matthew Roberts mattr at ics.mq.edu.au
Wed Jan 12 06:09:58 EST 2005


>
> I find that I don't need unit testing frameworks.  A few features of 
> Haskell and the associated interpreters (ghci and hugs) combine to 
> make "unit testing as you go" really easy.  I just write a few tests 
> for each function I write and then some more module wide tests once 
> the whole module is finished.  Sometimes I need a little scaffolding 
> to be able to output complex data types (or type synonyms), but often 
> just deriving Show does the job!
>
> To me, unit testing is two things
>  - testing at a low level (each and every function_
>  - regression testing by running all the unit tests again
>
> The second may benefit more from the frameworks, but I find the first 
> can be done very effectively on an "ad-hoc" basis.
>
> Matt
>
> On 12/01/2005, at 6:05 AM, Dmitri Pissarenko wrote:
>
>> Hello!
>>
>> When programming in an imperative language like Java, unit tests are 
>> a very
>> important development tool IMHO.
>>
>> I want to try out unit testing in Haskell and wonder what experienced 
>> Haskellers
>> think about unit testing in Haskell in general and the hUnit testing 
>> framework
>> (see URL below) in particular?
>>
>> http://hunit.sourceforge.net/
>>
>> What other unit testing frameworks for Haskell do you use?
>>
>> TIA
>>
>> dap
>> -- 
>> Dmitri Pissarenko
>> Software Engineer
>> http://dapissarenko.com
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



More information about the Haskell-Cafe mailing list