Closed as not planned
Description
When calling assertSame
for two different instances of identical objects the failure message will be quite confusing: "expected same:<[1, 2]> was not:<[1, 2]>".
See
junit4/src/main/java/org/junit/Assert.java
Line 829 in 8c9e81d
I think the clarity could be improved by adding identityHashCode to the message, like this:
"expected same:<[1, 2]@ba38e> was not:<[1, 2]@de440>"
Or maybe even with the class name:
"expected same:<java.util.List@ba38e [1, 2]> was not:<java.util.List@de440 [1, 2]>"
Metadata
Metadata
Assignees
Labels
No labels