mirror of https://github.com/stretchr/testify.git
assert.InEpsilonSlice: mention index of error in fail message
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…
Reference in New Issue