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

Function WithinRangef

internal/testify/require/require.go:2009–2017  ·  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

2007//
2008// assert.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted")
2009func 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.
2020func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) {

Callers 1

WithinRangefMethod · 0.70

Calls 3

WithinRangefFunction · 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…