Skip to content

Commit 51a7194

Browse files
committed
assert.InEpsilonSlice: refactor
1 parent 6895169 commit 51a7194

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

assert/assertions.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,9 +1474,8 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m
14741474
}
14751475

14761476
for i := 0; i < expectedLen; i++ {
1477-
result := InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon)
1478-
if !result {
1479-
return result
1477+
if !InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon) {
1478+
return false
14801479
}
14811480
}
14821481

0 commit comments

Comments
 (0)