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 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