MCPcopy Create free account
hub / github.com/desertbit/timer / TestResetPanic

Function TestResetPanic

timer_test.go:286–296  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

284}
285
286func TestResetPanic(t *testing.T) {
287 defer func() {
288 r := recover()
289 if r == nil || r.(string) != "timer: Reset called on uninitialized Timer" {
290 t.Errorf("reset timer: invalid reset panic")
291 }
292 }()
293
294 timer := &Timer{}
295 timer.Reset(0)
296}
297
298func TestResetBehavior(t *testing.T) {
299 start := time.Now()

Callers

nothing calls this directly

Calls 1

ResetMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…