Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

By reading the unit tests and code comments, and comparing them against bits of the actual codebase, you can gain a better understanding of what the previous programmer was thinking and what he was trying to accomplish.


That's the most obvious benefit of having tests for me. Documentation can be outdated and even if it isn't it very rarely contains examples of use. Passing tests are for me exactly that. An up to date example of how the thing should be used and what can I expect from it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: