Skip to content

Commit f8dcfd6

Browse files
committed
assert.InEpsilonSlice: mention index of error in fail message
1 parent 7d383ba commit f8dcfd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assert/assertions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m
14841484
}
14851485

14861486
for i := 0; i < expectedLen; i++ {
1487-
if !InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon) {
1487+
if !InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon, "at index %d", i) {
14881488
return false
14891489
}
14901490
}

0 commit comments

Comments
 (0)