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

Method AddOutput

parser/parse.go:191–199  ·  view source on GitHub ↗
(pkg string, test string, output []byte)

Source from the content-addressed store, hash-verified

189}
190
191func (p *packageTracker) AddOutput(pkg string, test string, output []byte) {
192 pkgObj := p.ensurePackage(pkg)
193 if test == "" {
194 pkgObj.Output = pkgObj.Output + string(output) + "\n"
195 return
196 }
197 testCase := p.ensureTest(pkgObj, test)
198 testCase.Output = testCase.Output + string(output) + "\n"
199}
200
201func (p *packageTracker) ensureTest(pkgObj *Package, test string) *TestCase {
202 if _, ok := pkgObj.TestCasesByName[test]; !ok {

Callers 1

parseFunction · 0.95

Calls 2

ensurePackageMethod · 0.95
ensureTestMethod · 0.95

Tested by

no test coverage detected