MCPcopy Create free account
hub / github.com/expr-lang/expr / WithinRangef

Method WithinRangef

internal/testify/assert/assertion_forward.go:1584–1589  ·  view source on GitHub ↗

WithinRangef asserts that a time is within a time range (inclusive). a.WithinRangef(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted")

(actual time.Time, start time.Time, end time.Time, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

1582//
1583// a.WithinRangef(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted")
1584func (a *Assertions) WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool {
1585 if h, ok := a.t.(tHelper); ok {
1586 h.Helper()
1587 }
1588 return WithinRangef(a.t, actual, start, end, msg, args...)
1589}
1590
1591// Zero asserts that i is the zero value for its type.
1592func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) bool {

Callers

nothing calls this directly

Calls 2

WithinRangefFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected