Skip to content

all: Replace common usage of cmp.Diff with testutil.DeepCompare

Administrator requested to merge testutil-deepcompare into master

Created by: ryanslade

It's pretty common in our codebase to use `cmp.Diff':

rg cmp.Diff | wc -l
473

Should we replace it with a helper function?

I've made the change to the simple case where we check for a non empty diff and then call t.Fatal

To cover all cases we'd also need to handle uses of t.Fatalf and t.Error/f

We could add testutil.DeepCompareFatal/f that takes a format string.

WDYT?

Merge request reports

Loading