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

Function setUpTest

utils/trace/trace_test.go:17–29  ·  view source on GitHub ↗
(t testing.TB, buf *bytes.Buffer)

Source from the content-addressed store, hash-verified

15}
16
17func setUpTest(t testing.TB, buf *bytes.Buffer) {
18 t.Cleanup(func() {
19 if buf != nil {
20 buf.Reset()
21 }
22 SetTarget(0)
23 })
24 w := io.Discard
25 if buf != nil {
26 w = buf
27 }
28 SetLogger(log.New(w, "", 0))
29}
30
31func TestEmpty(t *testing.T) {
32 var buf bytes.Buffer

Callers 7

TestEmptyFunction · 0.70
TestOneTargetFunction · 0.70
TestMultipleTargetsFunction · 0.70
TestPrintfFunction · 0.70
BenchmarkDisabledTargetFunction · 0.70
BenchmarkEnabledTargetFunction · 0.70

Calls 3

SetTargetFunction · 0.85
SetLoggerFunction · 0.85
ResetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…