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

Method SetCoverage

parser/parse.go:283–294  ·  view source on GitHub ↗
(pkg string, test string, coverage float64)

Source from the content-addressed store, hash-verified

281}
282
283func (p *packageTracker) SetCoverage(pkg string, test string, coverage float64) {
284 if pkg == "" {
285 return
286 }
287 pkgObj := p.ensurePackage(pkg)
288 if test == "" {
289 pkgObj.Coverage = &coverage
290 return
291 }
292 testCase := p.ensureTest(pkgObj, test)
293 testCase.Coverage = &coverage
294}
295
296func (p *packageTracker) AddReason(pkg string, reason string) {
297 if pkg == "" {

Callers 1

parseFunction · 0.95

Calls 2

ensurePackageMethod · 0.95
ensureTestMethod · 0.95

Tested by

no test coverage detected