News for hackers. Stuff that matters.
Re:Is TDD Dead? (2014) by Insanity on Wednesday August 26, 2020 @08:40AM (#24281849)
+1 especially to the final point.

If there was a bug, this bug should be replicated in the test. You then solve the bug, make sure the test (and others pass), and you'll be (relatively) sure the bug will not be reintroduced with a later change.

Every bug you find is an "edge-case" you didn't anticipate. Leave it in the test for the future. I find that the "table test" approach of Go works surprisingly well with this. You just add a case to the table, and often that's all you have to do.

There are no comments on this comment yet.