MCPcopy
hub / github.com/go-git/go-git / TestDisabledMultipleTargets

Function TestDisabledMultipleTargets

utils/trace/trace_test.go:71–80  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

69}
70
71func TestDisabledMultipleTargets(t *testing.T) {
72 var buf bytes.Buffer
73 setUpTest(t, &buf)
74 SetTarget(General)
75 General.Print("a")
76 Packet.Print("b")
77 if buf.String() != "a\n" {
78 t.Error("expected 'a\n'")
79 }
80}
81
82func BenchmarkDisabledTarget(b *testing.B) {
83 setUpTest(b, nil)

Callers

nothing calls this directly

Calls 5

SetTargetFunction · 0.85
PrintMethod · 0.80
setUpTestFunction · 0.70
StringMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…