71
// generic parameters and slice casting (say from []historyEvent) to
72
// []proto.Message is impossible
73
>
func ProtoSliceEqual[T proto.Message](t require.TestingT, a []T, b []T) {
require.go
74
>
if th, ok := t.(helper); ok {
75
>
th.Helper()
76
>
}
77
>
if len(a) != len(b) {
78
require.Fail(t, fmt.Sprintf("Proto slice length mismatch: want %d, got %d", len(a), len(b)))
79
return
80
}
82
if diff := cmp.Diff(a[i], b[i], protocmp.Transform()); diff != "" {
83
require.Fail(t, fmt.Sprintf("Proto mismatch at index %d (-want +got):\n%v", i, diff))