MCPcopy
hub / github.com/uber-go/zap / TestStacktraceWithoutCallerSkip

Function TestStacktraceWithoutCallerSkip

stacktrace_ext_test.go:122–131  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

120}
121
122func TestStacktraceWithoutCallerSkip(t *testing.T) {
123 withLogger(t, func(logger *zap.Logger, out *bytes.Buffer) {
124 func() {
125 logger.Error("test log")
126 }()
127
128 require.Contains(t, out.String(), "TestStacktraceWithoutCallerSkip.", "Should not skip too much")
129 verifyNoZap(t, out.String())
130 })
131}
132
133func TestStacktraceWithCallerSkip(t *testing.T) {
134 withLogger(t, func(logger *zap.Logger, out *bytes.Buffer) {

Callers

nothing calls this directly

Calls 4

verifyNoZapFunction · 0.85
withLoggerFunction · 0.70
ErrorMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected