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

Function TestStopPanic

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

Source from the content-addressed store, hash-verified

128}
129
130func TestStopPanic(t *testing.T) {
131 defer func() {
132 r := recover()
133 if r == nil || r.(string) != "timer: Stop called on uninitialized Timer" {
134 t.Errorf("stop timer: invalid stop panic")
135 }
136 }()
137
138 timer := &Timer{}
139 timer.Stop()
140}
141
142func TestMultipleStop(t *testing.T) {
143 var timers []*Timer

Callers

nothing calls this directly

Calls 1

StopMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…