[#5] Fix bad field naming
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
This commit is contained in:
parent
c77afdc879
commit
66bd0dc9d6
1 changed files with 17 additions and 17 deletions
|
@ -14,14 +14,14 @@ import (
|
||||||
var mu sync.Mutex
|
var mu sync.Mutex
|
||||||
|
|
||||||
type coverline struct {
|
type coverline struct {
|
||||||
Doc string
|
Doc string
|
||||||
Opcode int
|
Opcode int
|
||||||
StartLine int
|
StartLine int
|
||||||
StartCol int
|
StartCol int
|
||||||
EndLine int
|
EndLine int
|
||||||
EndCol int
|
EndCol int
|
||||||
WTFnumber int
|
Statements int
|
||||||
IsCovered bool
|
IsCovered bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// MakeCoverage generates an output file with coverage info in correct format.
|
// MakeCoverage generates an output file with coverage info in correct format.
|
||||||
|
@ -59,14 +59,14 @@ func getSeqPoints(t testing.TB, di *compiler.DebugInfo, docs []int) []coverline
|
||||||
for _, seqPoint := range method.SeqPoints {
|
for _, seqPoint := range method.SeqPoints {
|
||||||
if isValidDocument(seqPoint.Document, docs) && seqPoint.Opcode < int(maxLine) {
|
if isValidDocument(seqPoint.Document, docs) && seqPoint.Opcode < int(maxLine) {
|
||||||
res = append(res, coverline{
|
res = append(res, coverline{
|
||||||
Doc: di.Documents[seqPoint.Document],
|
Doc: di.Documents[seqPoint.Document],
|
||||||
Opcode: seqPoint.Opcode,
|
Opcode: seqPoint.Opcode,
|
||||||
StartLine: seqPoint.StartLine,
|
StartLine: seqPoint.StartLine,
|
||||||
StartCol: seqPoint.StartCol,
|
StartCol: seqPoint.StartCol,
|
||||||
EndLine: seqPoint.EndLine,
|
EndLine: seqPoint.EndLine,
|
||||||
EndCol: seqPoint.EndCol,
|
EndCol: seqPoint.EndCol,
|
||||||
WTFnumber: 1,
|
Statements: 1,
|
||||||
IsCovered: false,
|
IsCovered: false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ func printToFile(t testing.TB, cov []coverline, name string) {
|
||||||
if info.IsCovered {
|
if info.IsCovered {
|
||||||
covered++
|
covered++
|
||||||
}
|
}
|
||||||
line := fmt.Sprintf("%s:%d.%d,%d.%d %d %d\n", info.Doc, info.StartLine, info.StartCol, info.EndLine, info.EndCol, info.WTFnumber, covered)
|
line := fmt.Sprintf("%s:%d.%d,%d.%d %d %d\n", info.Doc, info.StartLine, info.StartCol, info.EndLine, info.EndCol, info.Statements, covered)
|
||||||
_, err = f.WriteString(line)
|
_, err = f.WriteString(line)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue