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

Function WithinRangef

assert/assertion_format.go:845–850  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

843//
844// assert.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted")
845func WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool {
846 if h, ok := t.(tHelper); ok {
847 h.Helper()
848 }
849 return WithinRange(t, actual, start, end, append([]interface{}{msg}, args...)...)
850}
851
852// YAMLEqf asserts that two YAML strings are equivalent.
853func YAMLEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool {

Callers 2

WithinRangefFunction · 0.92
WithinRangefMethod · 0.70

Calls 2

WithinRangeFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected