Skip to content

Commit 1930511

Browse files
authored
testing(internal/godocfx): convert equality check to a diff check (googleapis#13089)
towards: googleapis#12922
1 parent e6b9d41 commit 1930511

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/godocfx/godocfx_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ func TestGoldens(t *testing.T) {
174174
t.Fatalf("failed to read golden: %v", err)
175175
}
176176

177-
if string(gotContent) != string(goldenContent) {
178-
t.Errorf("got %s is different from expected %s", gotPath, goldenPath)
177+
if diff := cmp.Diff(goldenContent, gotContent); diff != "" {
178+
t.Errorf("diff with golden (%q,%q) (-want +got):\n\n%s", goldenPath, gotPath, diff)
179179
}
180180

181181
return nil

0 commit comments

Comments
 (0)