Skip to content

Commit cd633ae

Browse files
committed
fixed file bug in coverage.go
1 parent 79d4139 commit cd633ae

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

coverage.go

+2
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ func (l Parser) processLcov() (Report, error) {
139139
}
140140

141141
}
142+
// Add last file
143+
report.Files = append(report.Files, fileReport)
142144
return report, nil
143145
}
144146

coverage_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ func TestLCOV(t *testing.T) {
1717
assert.Equal(t, 1695, report.TotalFunctions)
1818
assert.Equal(t, 2798, report.CoveredLines)
1919
assert.Equal(t, 6395, report.TotalLines)
20+
assert.Equal(t, 182, len(report.Files))
21+
2022
}
2123

2224
func TestCobertura(t *testing.T) {

0 commit comments

Comments
 (0)