assert.InEpsilonSlice: refactor

pull/1483/head
Olivier Mengué 2023-10-10 04:18:28 +02:00
parent f7fbc7da15
commit 7d383ba732
1 changed files with 2 additions and 3 deletions

View File

@ -1484,9 +1484,8 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m
} }
for i := 0; i < expectedLen; i++ { for i := 0; i < expectedLen; i++ {
result := InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon) if !InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon) {
if !result { return false
return result
} }
} }