News for hackers. Stuff that matters.
Re:Pledging for unit tests by mononcqc on Friday October 29, 2010 @11:42AM (#1847659)
I'm not sure any type system can even notice that I returned True instead of False, had a 'not' where I shouldn't, that I forgot about operator precedence in some spot, that the string I return indeed has the format asked by in a specification, that I validated all input correctly, etc.

Unit tests are useful for all these ugly things that come from developers not paying attention to something. I've found them extremely useful as a sanity check when I get a particular specification (might it be a design document, an API or a specific RFC).

Then again, the testing I usually found the most useful had to be integration testing. I would just sit with the testers, see what they expect the program to be and basically translate the test cases they would do (or that I would do in a REPL) into a module and run it. Lots of time saved for everyone in the process.

There are no comments on this comment yet.