Bug summary
When InEpsilonSlice takes a custom error message and the assertion fails, the custom message isn't displayed.
The issue is that in InEpsilonSlice implementation, msgAndArgs isn't passed to InEpsilon when iterating over slice elements:
|
result := InEpsilon(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), epsilon) |
It should be:
result := InEpsilon(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), epsilon, msgAndArgs...)
To reproduce
Write any test where InEpsilonSlice fails and takes a custom message. The message wouldn't be displayed.
Bug summary
When
InEpsilonSlicetakes a custom error message and the assertion fails, the custom message isn't displayed.The issue is that in
InEpsilonSliceimplementation,msgAndArgsisn't passed toInEpsilonwhen iterating over slice elements:testify/assert/assertions.go
Line 1366 in 0ab3ce1
It should be:
To reproduce
Write any test where
InEpsilonSlicefails and takes a custom message. The message wouldn't be displayed.