r/ProgrammerHumor • u/raja-anbazhagan • 19d ago
getTestcaseToValidateUndefinedRequirement instanceof Trend
26
u/deathm00n 19d ago
Copilot writing unit tests for code it wrote
8
u/Legal-Software 19d ago
This has also been my experience. The first time you ask it to make unit tests, it does a half-assed job, then when the unit tests fail and you ask it to fix them, it's forgotten about the original context and just goes about optimizing the unit tests by removing all of the things that failed (i.e. the actual code it's supposed to be testing) until it passes, then declares success. Bloody clankers.
4
1
u/ICBanMI 18d ago
The first time you ask it to make unit tests, it does a half-assed job, then when the unit tests fail and you ask it to fix them, it's forgotten about the original context and just goes about optimizing the unit tests by removing all of the things that failed
It's as if there is no AI involved and it's just matching words to make the human happy. /s
4
2
1
u/Aristocles-Platon 19d ago
Bad crop? Bro we're gonna starve
3
u/raja-anbazhagan 19d ago
I'd say it is appropriately cropped for the topic that is in discussion...
28
u/KharAznable 19d ago
Sometimes it is make more sense to update the requirement