(t *testing.T)
| 96 | } |
| 97 | |
| 98 | func 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 | |
| 118 | func TestLoggerErrorExpected(t *testing.T) { |
| 119 | checkMessages(t, zapcore.DebugLevel, nil, zapcore.ErrorLevel, []string{ |
nothing calls this directly
no test coverage detected