(t *testing.T)
| 1297 | } |
| 1298 | |
| 1299 | func TestUpdateContextOnZeroValueLogger(t *testing.T) { |
| 1300 | // A zero-value Logger has a nil writer and should be treated as |
| 1301 | // disabled by UpdateContext. See issue #643. |
| 1302 | var log Logger |
| 1303 | |
| 1304 | called := false |
| 1305 | log.UpdateContext(func(c Context) Context { |
| 1306 | called = true |
| 1307 | return c.Str("foo", "bar") |
| 1308 | }) |
| 1309 | |
| 1310 | if called { |
| 1311 | t.Error("UpdateContext should not call update func on a zero-value logger") |
| 1312 | } |
| 1313 | } |
| 1314 | |
| 1315 | func TestLevel_String(t *testing.T) { |
| 1316 | tests := []struct { |
nothing calls this directly
no test coverage detected