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

I've found unit tests valuable as executable documentation for inner interfaces that manual testing can't reach easily

Say I've got some algorithm like a binary search that you can implement in a page of code but it's gonna be buried three layers deep in the business logic. You could expose a debug command and test it manually, or you could throw a few unit tests on it to hit all the edge cases, make sure it gives the expected outputs for given inputs, and then you know there aren't major bugs there



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

Search: