assert.InEpsilonSlice: mention index of error in fail message

pull/1483/head
Olivier Mengué 2023-10-10 04:22:18 +02:00
parent 7d383ba732
commit f8dcfd6618
1 changed files with 1 additions and 1 deletions

View File

@ -1484,7 +1484,7 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m
} }
for i := 0; i < expectedLen; i++ { 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 return false
} }
} }