From f8dcfd66187e703f37d04bf2b17a55c20e4029aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Tue, 10 Oct 2023 04:22:18 +0200 Subject: [PATCH] assert.InEpsilonSlice: mention index of error in fail message --- assert/assertions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assert/assertions.go b/assert/assertions.go index e78ac31..e92f588 100644 --- a/assert/assertions.go +++ b/assert/assertions.go @@ -1484,7 +1484,7 @@ func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, m } 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 } }