Skip to content

Commit

Permalink
Address code review
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed Jan 21, 2024
1 parent 8be490c commit 5d701a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions imagehash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ func TestNewImageHash(t *testing.T) {
func TestNil(t *testing.T) {
hash := NewImageHash(0, AHash)
dis, err := hash.Distance(nil)
if dis != -1 {
t.Errorf("Distance is expected as %d but got %d", -1, dis)
}
expectedError := errors.New("other should not be nil")
if err != nil && err.Error() != expectedError.Error() {
t.Errorf("Expected err %s, actual %s", expectedError, err)
}
if dis != -1 {
t.Errorf("Distance is expected as %d but got %d", -1, dis)
}
}

func TestSerialization(t *testing.T) {
Expand Down

0 comments on commit 5d701a4

Please sign in to comment.