MCPcopy Index your code
hub / github.com/tinygo-org/tinygo / tRunner

Function tRunner

src/testing/testing.go:482–496  ·  view source on GitHub ↗
(t *T, fn func(t *T))

Source from the content-addressed store, hash-verified

480}
481
482func tRunner(t *T, fn func(t *T)) {
483 defer func() {
484 t.runCleanup()
485 }()
486
487 // Run the test.
488 t.start = time.Now()
489 fn(t)
490 t.duration += time.Since(t.start) // TODO: capture cleanup time, too.
491
492 t.report() // Report after all subtests have finished.
493 if t.parent != nil && !t.hasSub {
494 t.setRan()
495 }
496}
497
498// Run runs f as a subtest of t called name. It waits until the subtest is finished
499// and returns whether the subtest succeeded.

Callers 2

RunMethod · 0.85
runTestsFunction · 0.85

Calls 4

runCleanupMethod · 0.80
NowMethod · 0.80
reportMethod · 0.80
setRanMethod · 0.80

Tested by

no test coverage detected