(t *testing.T)
| 709 | } |
| 710 | |
| 711 | func TestMsgf(t *testing.T) { |
| 712 | out := &bytes.Buffer{} |
| 713 | log := New(out) |
| 714 | log.Log().Msgf("one %s %.1f %d %v", "two", 3.4, 5, errors.New("six")) |
| 715 | if got, want := decodeIfBinaryToString(out.Bytes()), `{"message":"one two 3.4 5 six"}`+"\n"; got != want { |
| 716 | t.Errorf("invalid log output:\ngot: %v\nwant: %v", got, want) |
| 717 | } |
| 718 | } |
| 719 | |
| 720 | func TestWithAndFieldsCombined(t *testing.T) { |
| 721 | out := &bytes.Buffer{} |
nothing calls this directly
no test coverage detected
searching dependent graphs…