Skip to content

Commit 55efc55

Browse files
committed
assert.InEpsilonSlice: mention index of error in fail message
1 parent 51a7194 commit 55efc55

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
@@ -1474,7 +1474,7 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m
14741474
}
14751475

14761476
for i := 0; i < expectedLen; i++ {
1477-
if !InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon) {
1477+
if !InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon, "at index %d", i) {
14781478
return false
14791479
}
14801480
}

0 commit comments

Comments
 (0)