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 18, 2023
1 parent 7d383ba commit f8dcfd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assert/assertions.go
Expand Up @@ -1484,7 +1484,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 f8dcfd6

Please sign in to comment.