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

Function TestLoggerFatalExpected

zapgrpc/zapgrpc_test.go:138–156  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

136}
137
138func TestLoggerFatalExpected(t *testing.T) {
139 checkMessages(t, zapcore.DebugLevel, nil, zapcore.FatalLevel, []string{
140 "hello",
141 "s1s21 2 3s34s56",
142 "hello world",
143 "",
144 "foo",
145 "foo bar",
146 "s1 s2 1 2 3 s3 4 s5 6",
147 }, func(logger *Logger) {
148 logger.Fatal("hello")
149 logger.Fatal("s1", "s2", 1, 2, 3, "s3", 4, "s5", 6)
150 logger.Fatalf("%s world", "hello")
151 logger.Fatalln()
152 logger.Fatalln("foo")
153 logger.Fatalln("foo", "bar")
154 logger.Fatalln("s1", "s2", 1, 2, 3, "s3", 4, "s5", 6)
155 })
156}
157
158func TestLoggerV(t *testing.T) {
159 tests := []struct {

Callers

nothing calls this directly

Calls 4

checkMessagesFunction · 0.85
FatalMethod · 0.45
FatalfMethod · 0.45
FatallnMethod · 0.45

Tested by

no test coverage detected