MCPcopy
hub / github.com/stretchr/testify / WithinRange

Method WithinRange

require/require_forward.go:1677–1682  ·  view source on GitHub ↗

WithinRange asserts that a time is within a time range (inclusive). a.WithinRange(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second))

(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

1675//
1676// a.WithinRange(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second))
1677func (a *Assertions) WithinRange(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) {
1678 if h, ok := a.t.(tHelper); ok {
1679 h.Helper()
1680 }
1681 WithinRange(a.t, actual, start, end, msgAndArgs...)
1682}
1683
1684// WithinRangef asserts that a time is within a time range (inclusive).
1685//

Callers

nothing calls this directly

Calls 2

WithinRangeFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected