
9 Jan
2012
9 Jan
'12
2:18 a.m.
Doctest came from the Python tradition, which is a very imperative outlook on life. I wonder whether doctest could be modified to better match the programming, documentation, and testing style of Haskell. In particular, I'd expect it to recognize "=="-style statements as things to test. The only real issue is whether those statements should be considered unit tests or properties (testable by QuickCheck and SmallCheck), since those two categories have very different methods of being verified.
Isn't a unit test just a property with 0 free variable? If so, equality statements can always be handled by Quick/SmallCheck. Cheers, JP.