InDeltaf asserts that the two numerals are within delta of each other. assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted")
(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{})
| 925 | // |
| 926 | // assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted") |
| 927 | func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { |
| 928 | if h, ok := t.(tHelper); ok { |
| 929 | h.Helper() |
| 930 | } |
| 931 | if assert.InDeltaf(t, expected, actual, delta, msg, args...) { |
| 932 | return |
| 933 | } |
| 934 | t.FailNow() |
| 935 | } |
| 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{}) { |