testify icon indicating copy to clipboard operation
testify copied to clipboard

Misplaced "expected" and "actual" Arguments Inside InEpsilonSlice

Open vaguecoder opened this issue 3 years ago • 0 comments

Both InEpsilon and InEpsilonSlice has parameter expected before actual

func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool
func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool

However, InEpsilon's call inside InEpsilonSlice has the arguments misplaced:

result := InEpsilon(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), epsilon)

vaguecoder avatar Jul 17 '22 06:07 vaguecoder