
25 Dec
2011
25 Dec
'11
10:19 p.m.
Consistent unit tests and documentation seems like a nice benefit to me (don't forget about modifying and deleting unit tests). However, I agree that the structure imposed by doctest might lead to less than tasteful documentation.
I agree. I should implement document test which evaluates examples of Data.Map (for instance) directly: ---- insert 5 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'x')] insert 7 'x' (fromList [(5,'a'), (3,'b')]) == fromList [(3, 'b'), (5, 'a'), (7, 'x')] insert 5 'x' empty == singleton 5 'x' ---- And sees if they return True. --Kazu