more automatic tests for containers
Kazu Yamamoto ( 山本和彦 )
kazu at iij.ad.jp
Wed Dec 28 02:20:43 CET 2011
> 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.
The following hack to doctest enables that empty example results are
treated as True.
So, if we convert
-- > Data.Map.null (empty) == True
-- >>> Data.Map.null (empty) == True
the modified doctest can handle this example as test case.
If people like this approach, I will send a pull request to the author
of doctest and convert the examples of the containers library.
More information about the Libraries