On 1 Oct, 11:02, p...@informatimago.com (Pascal J. Bourguignon) wrote: > Seebs <usenet-nos...@seebs.net> writes: > > On 2010-09-30, Ian Collins <ian-n...@hotmail.com> wrote:
> >> Which is why agile practices such as TDD have an edge. If it compiles > >> *and* passes all its tests, it must be right. > > > So far as I know, that actually just means that the test suite is > > insufficient. :) > > > Based on my experience thus far, anyway, I am pretty sure it's essentially > > not what happens that the tests and code are both correct, and it is usually > > the case either that the tests fail or that there are not enough tests. > > It also shows that for languages such as C, you cannot limit the unit tests > to the types declared for the function, but that you should try all the > possible values of the language. I'm not sure what you mean by "all the possible values of the language". But some meanings of that statement are plainly wrong! For instance you don't test every possible pair of ints in a max() function (maybe 2^64 distinct tests!) > Which basically, is the same as with dynamically typed programming > language, only now, some unit tests will fail early, when trying to > compile them while others will give wrong results later. <snip> -- http://mail.python.org/mailman/listinfo/python-list