MCPcopy
hub / github.com/willnorris/imageproxy / TestProxy_log

Function TestProxy_log

imageproxy_test.go:678–696  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

676}
677
678func 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
698func TestProxy_log_default(t *testing.T) {
699 var b strings.Builder

Callers

nothing calls this directly

Calls 3

logMethod · 0.95
logfMethod · 0.95
StringMethod · 0.45

Tested by

no test coverage detected