Yeah, me too...

  • 4
    You should have higher expectations
  • 3
    They are different objects 😉
  • 1
    Although they are different objects I always giggle at those errors, I bet that if the compiler could he would do the same.
  • 3
    {} == {} is false because the memory address are what is compared, not the contents of the object.
  • 0
    @AlgoRythm that's not what's actually happening though. This test performs a deep comparison of the members of each object. The objects passed to the assertion weren't empty either, that's just what shows up in the error message because of the test framework trying to make the error messages as useful as possible.
Add Comment