MCPcopy Create free account
hub / github.com/AdRoll/baker / makeTestLog

Function makeTestLog

input/list_test.go:55–69  ·  view source on GitHub ↗
(tb testing.TB, dir, fn string, numlines int)

Source from the content-addressed store, hash-verified

53}
54
55func makeTestLog(tb testing.TB, dir, fn string, numlines int) string {
56 tb.Helper()
57
58 fn = dir + "/" + fn
59
60 f, err := os.Create(fn)
61 if err != nil {
62 tb.Fatalf("can't create test log file: %v", err)
63 }
64 defer f.Close()
65
66 writeTestLog(tb, f, numlines)
67
68 return fn
69}
70
71func writeTestLog(tb testing.TB, w io.Writer, numlines int) {
72 tb.Helper()

Callers 1

TestListBasicFunction · 0.85

Calls 2

writeTestLogFunction · 0.85
CloseMethod · 0.65

Tested by

no test coverage detected