UnambiguousRepresentation
computes same output when types have same name but different packages
#3084
Labels
type: improvement
A general improvement
The error message produced by
isEqualTo
prints out the class name when the values have the same representation. While this helps disambiguate types with different class names, it doesn't help when the two types have the same name but different packages.For example, assuming two enum types, both having a
VALUE
constant:org.example.pkg1.Enum1
org.example.pkg2.Enum1
the following:
yields:
In such cases, printing the fully qualified class name would make the message clearer:
Any assertion that uses
UnambiguousRepresentation
which relies onRepresentation::unambiguousToStringOf
could benefit from this improvement, including the recursive comparison.The text was updated successfully, but these errors were encountered: