Is there an existing alternative to reflect.DeepEqual() that also respects the shape of the arguments? For example, the following tests fail:
type List struct { next *List } func TestList(t *testing.T) { a := &List{} a.next = a b := &List{a} if reflect.DeepEqual(a, b) { t.Error("Lists are equal") } } Basically, it should also check if cycles occur in the same places (essentially just mapping pointer addresses to a counter and checking if the value (the counter) is the same on both sides when seeing a pointer). -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.