logo       

Are tests code or comment (was: distinguishing between failures and errors): msg#00177

java.junit.user

Subject: Are tests code or comment (was: distinguishing between failures and errors)

>From my point of view comments and documentation is the manual (the
book), explaining how it should work and how it should be used.

Tests may be examples on usage.

I always prefer plain text documentation, its often easier to explain
in plain text how to use a class than with some hundred lines of test
cases. (And it is often easier to read.)

JB: You assume someone doing the tests careful but assume on the other
hand JavaDoc to be (usually) crap? I would not trust in the tests if
the JavaDoc was bad in the first case. And even if both were ok I would
not conclude from the absence of a test case that what would be tested
is undefined behaviour -- it is way too easy to miss a test case /
special condition / parameter combination.

Robert



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise