Types and Tests

Types and Tests

On the other hand, since I’m not using a static type system my tests make no sense if I don’t assume that the elements in the result set come from the source list. If you call this function from a module that you wrote with tests, using something as effective as the TDD discipline, you won’t be passing or negative numbers, or any other form of invalid arguments. This is the crux of the argument between Mark and I. I claim that the number of tests required are only those tests that are necessary to describe the correct behavior of the system.

Source: blog.cleancoder.com