WithinDurationf asserts that the two times are within duration delta of each other. assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted")
(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{})
| 808 | // |
| 809 | // assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") |
| 810 | func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool { |
| 811 | if h, ok := t.(tHelper); ok { |
| 812 | h.Helper() |
| 813 | } |
| 814 | return WithinDuration(t, expected, actual, delta, append([]interface{}{msg}, args...)...) |
| 815 | } |
| 816 | |
| 817 | // WithinRangef asserts that a time is within a time range (inclusive). |
| 818 | // |
no test coverage detected