One time while coding, I managed to get as test output:
Expected: Success
Found: Success
Thankfully, I knew immediately how I fucked up, otherwise this would've been a rather unfun debugging session...
Welcome to /c/SoftwareGore!
This is a community where you can poke fun at nasty software. This community is your go-to destination to look at the most cringe-worthy and facepalm-inducing moments of software gone wrong. Whether it's a user interface that defies all logic, a crash that leaves you in disbelief, silly bugs or glitches that make you go crazy, or an error message that feels like it was written by an unpaid intern, this is the place to see them all!
Remember to read the rules before you make a post or comment!
Community Rules - Click to expand
These rules are subject to change at any time with or without prior notice. (last updated: 7th December 2023 - Introduction of Rule 11 with one sub-rule prohibiting posting of AI content)
You should also check out these awesome communities!
One time while coding, I managed to get as test output:
Expected: Success
Found: Success
Thankfully, I knew immediately how I fucked up, otherwise this would've been a rather unfun debugging session...
Fucking up your printf arguments is a time-honored tradition
Not in this case, I'm afraid.
A library was returning a singleton Success-object (as opposed to several failure cases) and I decided to introduce an own type for that, but which also had a singleton Success-object. And well, I forgot to adjust the test assertion accordingly.
So, those were actually different objects from different classes being compared. But when displaying the test result to me, their .toString() yielded exactly the same: Success
Fucking singletons
You're bringing back nightmares from grad school. The "online" homework problems... Shudder.
Makes me wonder whether there's a whitespace character getting included in the comparison. Lowest bid developer doing lowest bid developer things.