Of course dev tests and compilation test different things. But it is silly to write tests for things which could be caught by compiler or somehow else automatically.
On your example: - writing test for this bug does not guarantee that there is no another bug; - writing test for a bug like typo in an ognl exception is silly by multiple reasons: o firstly there is a slim chance it will happens in the spot; o and there should be as less dynamic loose code as possible â in the presence of static type checks this type of error will not happens at all; o and lastly, code should strive for correctness and error prevention on architectural and basic levels rather than rely on checks: for example âintâ â just forget this type if there is a slimiest chance of getting over it in 10 years of production use â just use âlongâ and do not write any tests and checks. Again, tests do not prove absence of unknown bugs. They do not prevent developer unpredicted execution patches or conditions. Clarification: al I am saying does not mean that we do not need test. It means that tests are useful but not the reason for throwing away safety net of static type checks. --- Erik Hatcher <[EMAIL PROTECTED]> 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 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > Konstantin Ignatyev PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of CFCs to the stratosphere, and increase their population by 263,000 Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]