News for hackers. Stuff that matters.
Re:Testing like the TSA by Dn_Ab on Wednesday April 11, 2012 @05:30PM (#3829769)
I view unit tests as a kind of proof by counter-example. You have a logical structure your program embodies. This structure is very hard to specify mathematically and prove deductively so you come up with key statements that must at least evaluate to true for this structure/theory. The tests are a bunch of counter-examples that should be false (test passed).

If a random testing framework is available in your language they really should be integrated as they are able to come up with some pathological examples.

Re:Testing like the TSA by eru on Wednesday April 11, 2012 @06:02PM (#3829876)
For Haskell you can do even better than random testing: There's Lazy SmallCheck for exhaustive testing. (For some values of `better' and `exhaustive'.)