MCPcopy Index your code
hub / github.com/eapache/queue / assertPanics

Function assertPanics

queue_test.go:134–142  ·  view source on GitHub ↗
(t *testing.T, name string, f func())

Source from the content-addressed store, hash-verified

132}
133
134func assertPanics(t *testing.T, name string, f func()) {
135 defer func() {
136 if r := recover(); r == nil {
137 t.Errorf("%s: didn't panic as expected", name)
138 }
139 }()
140
141 f()
142}
143
144// General warning: Go's benchmark utility (go test -bench .) increases the number of
145// iterations until the benchmarks take a reasonable amount of time to run; memory usage

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…