InDelta asserts that the two numerals are within delta of each other. assert.InDelta(t, math.Pi, 22/7.0, 0.01)
(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{})
| 868 | // |
| 869 | // assert.InDelta(t, math.Pi, 22/7.0, 0.01) |
| 870 | func InDelta(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { |
| 871 | if h, ok := t.(tHelper); ok { |
| 872 | h.Helper() |
| 873 | } |
| 874 | if assert.InDelta(t, expected, actual, delta, msgAndArgs...) { |
| 875 | return |
| 876 | } |
| 877 | t.FailNow() |
| 878 | } |
| 879 | |
| 880 | // InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. |
| 881 | func InDeltaMapValues(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { |
searching dependent graphs…