MCPcopy Index your code
hub / github.com/expr-lang/expr / WithinRange

Function WithinRange

internal/testify/require/require.go:1996–2004  ·  view source on GitHub ↗

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{})

Source from the content-addressed store, hash-verified

1994//
1995// assert.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second))
1996func 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//

Callers 1

WithinRangeMethod · 0.70

Calls 3

WithinRangeFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…