InEpsilon asserts that expected and actual have a relative error less than epsilon
(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{})
| 936 | |
| 937 | // InEpsilon asserts that expected and actual have a relative error less than epsilon |
| 938 | func InEpsilon(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { |
| 939 | if h, ok := t.(tHelper); ok { |
| 940 | h.Helper() |
| 941 | } |
| 942 | if assert.InEpsilon(t, expected, actual, epsilon, msgAndArgs...) { |
| 943 | return |
| 944 | } |
| 945 | t.FailNow() |
| 946 | } |
| 947 | |
| 948 | // InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. |
| 949 | func InEpsilonSlice(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { |