557
558
// Panic implements log.Logger.
559
>
func (tl *TestLogger) Panic(msg string, tags ...tag.Tag) {
testlogger.go
560
>
tl.state.mu.RLock()
561
>
defer tl.state.mu.RUnlock()
562
>
if tl.state.mu.closed {
563
return
564
}
566
>
tl.recordExpectationMatches(Panic, msg, tags)
567
>
tl.state.t.Helper()
568
>
// Forcibly fail the test when required as otherwise panics can be caught.
569
>
if tl.shouldFailTest(Panic, msg, tags) {
570
tl.state.t.Helper()
571
tl.failTest(Panic, msg, tags...)
572
}
574
}
575