You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was added to ensure that non-intrinsic value type equivalence wasn't broken when we merged a change to enable reference types embedded in value types: xunit/assert.xunit@4899f6e.
This logic could use some review. At least two questions come to mind:
Why does this only apply to value types and not reference types?
Currently,
Assert.Equivalent
has a check for value types to see if they implementIComparable
:https://github.com/xunit/assert.xunit/blob/d04a4dcbb7288b4cf41e60db63a43be44f8d0cb5/Sdk/AssertHelper.cs#L124-L133
This was added to ensure that non-intrinsic value type equivalence wasn't broken when we merged a change to enable reference types embedded in value types: xunit/assert.xunit@4899f6e.
This logic could use some review. At least two questions come to mind:
Why does this only apply to value types and not reference types?
Why does this only check for
IComparable
? We current look forIEquatable<T>
,IComparable<T>
, andIComparable
as well asIStructuralEquatable
,IEquatable<T2>
, andIComparable<T2>
(there is an open issue about ordering)This was discovered while working through issue #2696.
The text was updated successfully, but these errors were encountered: