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

Function TestLoggerWarningExpected

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

Source from the content-addressed store, hash-verified

96}
97
98func TestLoggerWarningExpected(t *testing.T) {
99 checkMessages(t, zapcore.DebugLevel, nil, zapcore.WarnLevel, []string{
100 "hello",
101 "s1s21 2 3s34s56",
102 "hello world",
103 "",
104 "foo",
105 "foo bar",
106 "s1 s2 1 2 3 s3 4 s5 6",
107 }, func(logger *Logger) {
108 logger.Warning("hello")
109 logger.Warning("s1", "s2", 1, 2, 3, "s3", 4, "s5", 6)
110 logger.Warningf("%s world", "hello")
111 logger.Warningln()
112 logger.Warningln("foo")
113 logger.Warningln("foo", "bar")
114 logger.Warningln("s1", "s2", 1, 2, 3, "s3", 4, "s5", 6)
115 })
116}
117
118func TestLoggerErrorExpected(t *testing.T) {
119 checkMessages(t, zapcore.DebugLevel, nil, zapcore.ErrorLevel, []string{

Callers

nothing calls this directly

Calls 4

checkMessagesFunction · 0.85
WarningMethod · 0.80
WarningfMethod · 0.80
WarninglnMethod · 0.80

Tested by

no test coverage detected