Skip to content

Commit

Permalink
Refactor comparison of byte slices
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahFrench committed Jan 13, 2025
1 parent e375c88 commit f45e3e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/command/artifact/junit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func TestJUnitXMLFile_save(t *testing.T) {
t.Fatalf("unexpected error opening file")
}

if bytes.Compare(fileContent, xml) != 0 {
if !bytes.Equal(fileContent, xml) {
t.Fatalf("wanted XML:\n%s\n got XML:\n%s\n", string(xml), string(fileContent))
}
})
Expand Down

0 comments on commit f45e3e7

Please sign in to comment.