MCPcopy Create free account
hub / github.com/antchfx/xpath / assertPanic

Function assertPanic

assert_test.go:44–51  ·  view source on GitHub ↗
(t *testing.T, f func())

Source from the content-addressed store, hash-verified

42}
43
44func assertPanic(t *testing.T, f func()) {
45 defer func() {
46 if r := recover(); r == nil {
47 t.Errorf("The code did not panic")
48 }
49 }()
50 f()
51}

Callers 7

Test_func_containsFunction · 0.85
Test_func_ends_withFunction · 0.85
Test_func_starts_withFunction · 0.85
Test_func_sumFunction · 0.85
Test_func_matchesFunction · 0.85
Test_func_reverseFunction · 0.85
TestLoadingCacheFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…