mirror of
https://github.com/stretchr/testify.git
synced 2025-05-31 11:42:44 +00:00
assert.InEpsilonSlice: mention index of error in fail message
This commit is contained in:
parent
7d383ba732
commit
f8dcfd6618
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user