Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

17
  • 24
    Surely you should start earlier, at the 0 class/0 function point... if you're following TDD :) Commented Aug 8, 2012 at 12:52
  • 118
    +1. If you program is big enough to have bugs, it's big enough to have unit tests. Commented Aug 8, 2012 at 14:03
  • 9
    @JasonOrendorff: I'm mocking that up into a poster and putting it in my office. Brilliant. Commented Aug 8, 2012 at 14:50
  • 8
    While I don't necessarily disagree with the sentiment, if your code is really that simple you could probably get away with just assertions instead of full blown unit tests. Commented Aug 8, 2012 at 21:26
  • 2
    I gave you an upvote for the headline, but your example is more an example which shows some unit tests are pointless. I guess it could be improved by using a pseudocode function like AtLeastOneLineFunctionWithEnoughCodeToOverlookATypo(). Commented Dec 4, 2015 at 8:56