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
Update assert to compare data structures that are isomorphically equal (such as a Tree, Trie, etc) to one another, but not equal by value or reference.
Proposed solution
Define an Equal and Diff interface that structures can implement that the require/assert package will check on equality assertion (e.g. require.Equal(t, expected, actual)) rather than using DeepEqual.
Description
Update
assert
to compare data structures that are isomorphically equal (such as a Tree, Trie, etc) to one another, but not equal by value or reference.Proposed solution
Define an
Equal
andDiff
interface that structures can implement that therequire
/assert
package will check on equality assertion (e.g.require.Equal(t, expected, actual)
) rather than usingDeepEqual
.Use case
Currently, the Cilium codebase uses a
require.Truef
as a workaround, calling into a customEquals
method and a customDiff
method.The text was updated successfully, but these errors were encountered: