WithinRangef asserts that a time is within a time range (inclusive). assert.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted")
(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, args ...interface{})
| 2007 | // |
| 2008 | // assert.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") |
| 2009 | func WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) { |
| 2010 | if h, ok := t.(tHelper); ok { |
| 2011 | h.Helper() |
| 2012 | } |
| 2013 | if assert.WithinRangef(t, actual, start, end, msg, args...) { |
| 2014 | return |
| 2015 | } |
| 2016 | t.FailNow() |
| 2017 | } |
| 2018 | |
| 2019 | // Zero asserts that i is the zero value for its type. |
| 2020 | func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) { |
no test coverage detected
searching dependent graphs…