InEpsilon asserts that expected and actual have a relative error less than epsilon
(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{})
| 949 | |
| 950 | // InEpsilon asserts that expected and actual have a relative error less than epsilon |
| 951 | func InEpsilon(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { |
| 952 | if h, ok := t.(tHelper); ok { |
| 953 | h.Helper() |
| 954 | } |
| 955 | if assert.InEpsilon(t, expected, actual, epsilon, msgAndArgs...) { |
| 956 | return |
| 957 | } |
| 958 | t.FailNow() |
| 959 | } |
| 960 | |
| 961 | // InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. |
| 962 | func InEpsilonSlice(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { |