MCPcopy
hub / github.com/tinygo-org/tinygo / ioLogger

Function ioLogger

main_test.go:1038–1052  ·  view source on GitHub ↗
(t *testing.T, wg *sync.WaitGroup)

Source from the content-addressed store, hash-verified

1036}
1037
1038func ioLogger(t *testing.T, wg *sync.WaitGroup) io.WriteCloser {
1039 r, w := io.Pipe()
1040 wg.Add(1)
1041 go func() {
1042 defer wg.Done()
1043 defer r.Close()
1044
1045 scanner := bufio.NewScanner(r)
1046 for scanner.Scan() {
1047 t.Log(scanner.Text())
1048 }
1049 }()
1050
1051 return w
1052}
1053
1054func TestGetListOfPackages(t *testing.T) {
1055 opts := optionsFromTarget("", sema)

Callers 2

TestCorpusFunction · 0.85
TestTestFunction · 0.85

Calls 4

DoneMethod · 0.80
CloseMethod · 0.65
LogMethod · 0.65
AddMethod · 0.45

Tested by

no test coverage detected