(t *testing.T)
| 202 | } |
| 203 | |
| 204 | func TestPrefix(t *testing.T) { |
| 205 | var buf bytes.Buffer |
| 206 | SetOutput(colorprofile.NewWriter(&buf, os.Environ())) |
| 207 | SetLevel(WarnLevel) |
| 208 | SetReportCaller(false) |
| 209 | SetReportTimestamp(false) |
| 210 | SetPrefix("prefix") |
| 211 | Warn("info") |
| 212 | assert.Equal(t, "WARN prefix: info\n", buf.String()) |
| 213 | assert.Equal(t, "prefix", GetPrefix()) |
| 214 | SetPrefix("") |
| 215 | } |
| 216 | |
| 217 | func TestFormatter(t *testing.T) { |
| 218 | var buf bytes.Buffer |
nothing calls this directly
no test coverage detected
searching dependent graphs…