Yeah, I’ve done that, I still have tests that started out that way. Trouble is, I can’t be sure if those tests might still pass even if I make a change that should theoretically break them. I assume they pass for the right reason, but because I haven’t seen them fail, I don’t actually know.

Another problem: I might forget to write an automated test for something I tested “manually,” e.g., at the console I test negative numbers and 0 but I write an automated test for positive numbers only.

Of course it’s still possible to forget to test for something with TDD. But you have the confidence that if future changes to the source cause the program to function incorrectly in what your tests test for, then at least one of your tests will fail, alerting you to the problem.

is a composer and photographer from Detroit, Michigan. He has been working on a Java program to display certain mathematical diagrams.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store