WithinRange asserts that a time is within a time range (inclusive). assert.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second))
(t TestingT, actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{})
| 1994 | // |
| 1995 | // assert.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) |
| 1996 | func WithinRange(t TestingT, actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) { |
| 1997 | if h, ok := t.(tHelper); ok { |
| 1998 | h.Helper() |
| 1999 | } |
| 2000 | if assert.WithinRange(t, actual, start, end, msgAndArgs...) { |
| 2001 | return |
| 2002 | } |
| 2003 | t.FailNow() |
| 2004 | } |
| 2005 | |
| 2006 | // WithinRangef asserts that a time is within a time range (inclusive). |
| 2007 | // |
no test coverage detected
searching dependent graphs…