It's definitely too harsh to say that tests "don't help much." Good
tests can help a great deal. They can also be a pain in the ass to
maintain ... but they can help if done well.
*However*, Konstantin's fundamental point is a good one: tests can't
prove your code is correct. Actually, no automated system can prove
your code is correct -- this is a fundamental theorem in the theory
of computation (program equivalence is uncomputable). Strong static
typing does prove certain kinds of correctness that tests cannot, but
it still doesn't guarantee correctness.
Tests, frameworks, processes, language features, etc. can all help
developers write good code -- but nothing can *ensure* that
developers write good code except for the developers themselves.
Cheers,
Paul
On Dec 12, 2005, at 12:32 PM, Erik Hatcher wrote:
On Dec 12, 2005, at 10:50 AM, Konstantin Ignatyev wrote:
Tests cannot prove that code is bug free. It is simple
as that.
They definitely help, but not that much
Wow, where do you people come from with such a low opinion of testing?
They don't help much? Then I argue you're not writing the right
tests! Tests are a completely different level than compilation.
Compilation asserts proper syntax. Tests assert what you tell them
to assert. Here's an exercise for you all to try... next time a
bug is discovered in your system, write a test that shows that bug
by asserting the expected behavior that did not occur properly.
Now go fix the bug, and re-run the test. It now passes. That same
bug will not occur again provided you use your tests and keep them
always passing.
Erik - who is writing "extends TestCase" as he speaks
_________________________________________________________________
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]