this post was submitted on 19 Jan 2024
123 points (93.0% liked)
Programmer Humor
32725 readers
74 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
We should strive for a wide range of test cases. Real testing is done when the software is tested against a wide range of user inputs. Code coverage is no indicator of response to cases.
Unit tests are a fantastic way of implementing test cases. I am of the opinion that most bug PRs should start with a unit test, if nothing else, a persistent reminder that: hey BTW, your user is going to input this garbage, so any logic you implement ALSO has to be resilient against that garbage.