MCPcopy Create free account
hub / github.com/GoTestTools/gotestfmt / SetTestElapsed

Method SetTestElapsed

parser/parse.go:257–268  ·  view source on GitHub ↗
(pkg string, test string, elapsed time.Duration)

Source from the content-addressed store, hash-verified

255}
256
257func (p *packageTracker) SetTestElapsed(pkg string, test string, elapsed time.Duration) {
258 if pkg == "" {
259 return
260 }
261 pkgObj := p.ensurePackage(pkg)
262 if test == "" {
263 pkgObj.Duration = elapsed
264 return
265 }
266 testCase := p.ensureTest(pkgObj, test)
267 testCase.Duration = elapsed
268}
269
270func (p *packageTracker) SetResult(pkg string, test string, result Result) {
271 if pkg == "" {

Callers 1

parseFunction · 0.95

Calls 2

ensurePackageMethod · 0.95
ensureTestMethod · 0.95

Tested by

no test coverage detected