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

Method log

src/testing/testing.go:223–235  ·  view source on GitHub ↗

log generates the output.

(s string)

Source from the content-addressed store, hash-verified

221
222// log generates the output.
223func (c *common) log(s string) {
224 // This doesn't print the same as in upstream go, but works for now.
225 if len(s) != 0 && s[len(s)-1] == '\n' {
226 s = s[:len(s)-1]
227 }
228 lines := strings.Split(s, "\n")
229 // First line.
230 fmt.Fprintf(c.output, "%s %s\n", c.indent, lines[0])
231 // More lines.
232 for _, line := range lines[1:] {
233 fmt.Fprintf(c.output, "%s %s\n", c.indent, line)
234 }
235}
236
237// Log formats its arguments using default formatting, analogous to Println,
238// and records the text in the error log. For tests, the text will be printed only if

Callers 12

LogMethod · 0.95
LogfMethod · 0.95
ErrorMethod · 0.95
ErrorfMethod · 0.95
FatalMethod · 0.95
FatalfMethod · 0.95
SkipMethod · 0.95
SkipfMethod · 0.95
wasmexit.jsFile · 0.80
wasmfunc.jsFile · 0.80
writeSyncFunction · 0.80
constructorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected