3 ms·
The classic case is if I write tests, then write code and the tests pass first time I better break the code and make sure the tests definitely fail for a good r
by renewiltord 3y ago
The classic case is if I write tests, then write code and the tests pass first time I better break the code and make sure the tests definitely fail for a good reason.
- delusional 3y agoIf you want a structured and rigerous version of this it's called mutation testing. It can be quite slow, but also very informative when evaluation how well tested a piece of code is.
- gregw2 3y agoWith TDD you write tests first, then ensure your tests fail, then write code, ... for the reasons you mention.