(t *testing.T)
| 676 | } |
| 677 | |
| 678 | func TestProxy_log(t *testing.T) { |
| 679 | var b strings.Builder |
| 680 | |
| 681 | p := &Proxy{ |
| 682 | Logger: log.New(&b, "", 0), |
| 683 | } |
| 684 | p.log("Test") |
| 685 | |
| 686 | if got, want := b.String(), "Test\n"; got != want { |
| 687 | t.Errorf("log wrote %s, want %s", got, want) |
| 688 | } |
| 689 | |
| 690 | b.Reset() |
| 691 | p.logf("Test %v", 123) |
| 692 | |
| 693 | if got, want := b.String(), "Test 123\n"; got != want { |
| 694 | t.Errorf("logf wrote %s, want %s", got, want) |
| 695 | } |
| 696 | } |
| 697 | |
| 698 | func TestProxy_log_default(t *testing.T) { |
| 699 | var b strings.Builder |