Skip to content

Commit

Permalink
assert.InEpsilonSlice: mention index of error in fail message
Browse files Browse the repository at this point in the history
  • Loading branch information
dolmen committed Oct 10, 2023
1 parent 51a7194 commit 55efc55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assert/assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,7 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m
}

for i := 0; i < expectedLen; i++ {
if !InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon) {
if !InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon, "at index %d", i) {
return false
}
}
Expand Down

0 comments on commit 55efc55

Please sign in to comment.