MCPcopy
hub / github.com/bettercap/bettercap / assertPanic

Function assertPanic

session/command_handler_test.go:19–26  ·  view source on GitHub ↗
(t *testing.T, msg string, f func())

Source from the content-addressed store, hash-verified

17}
18
19func assertPanic(t *testing.T, msg string, f func()) {
20 defer func() {
21 if r := recover(); r == nil {
22 t.Fatal(msg)
23 }
24 }()
25 f()
26}
27
28func TestSessionCommandHandler(t *testing.T) {
29 var units = []struct {

Callers 1

Calls 2

fFunction · 0.50
FatalMethod · 0.45

Tested by

no test coverage detected