Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You might have separate assertions or separate tests for the different aspects. Insisting on only asserting equality forces you to lump them together, which can make the failure less clear.


Honest question, what kind of data type can't be compared to another instance of itself for equality? I have never encountered a situation where I have a value of a type which has some 'aspect' that cannot all be incorporated into the definition of `equals()` for its type. Seems to contravene the very notion of values and types. What am I missing?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: