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

Function TestWithinDuration

internal/testify/require/requirements_test.go:255–267  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

253}
254
255func TestWithinDuration(t *testing.T) {
256
257 a := time.Now()
258 b := a.Add(10 * time.Second)
259
260 WithinDuration(t, a, b, 15*time.Second)
261
262 mockT := new(MockT)
263 WithinDuration(mockT, a, b, 5*time.Second)
264 if !mockT.Failed {
265 t.Error("Check should fail")
266 }
267}
268
269func TestInDelta(t *testing.T) {
270

Callers

nothing calls this directly

Calls 3

WithinDurationFunction · 0.70
AddMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…