I find that most people write too few tests that are too large.
I would have one test case for each kind of expression in alpha-vary. One for each kind in g-c, where the sub-expression were trivial (ids). And for unify, you just need to check that each of the five cases is handled.
Jay
On Wed, Nov 30, 2011 at 5:42 PM, Parker J
<gado...@gmail.com> wrote:
How extensive should tests be for all of the intermediate steps up to the infer-type function? Do we need to have tons of lines of code testing all of the functionality of alpha-vary, generate-constraints, and unify? It just seems to me like the tests for generate-constraints and unify could get ridiculously long with writing out all of those lists. I mean, I know we need to convince ourselves that it works correctly before moving on, but how many tests for each piece do we need in order to convince you that it works correctly? :)
- Parker and David