Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoverageReport ¶
type CoverageReport struct {
TestName string
Files map[string]*FileCoverage
}
CoverageReport represents the complete coverage report
func NewCoverageReport ¶
func NewCoverageReport() *CoverageReport
NewCoverageReport creates a new empty coverage report
func (*CoverageReport) AddFile ¶
func (r *CoverageReport) AddFile(fc *FileCoverage)
AddFile adds a file coverage entry to the report
func (*CoverageReport) CalculateOverallCoverage ¶
func (r *CoverageReport) CalculateOverallCoverage() (totalLines int, totalCovered int, overallPct float64)
CalculateOverallCoverage calculates the total lines, covered lines, and overall coverage percentage across all files
func (*CoverageReport) GetFile ¶
func (r *CoverageReport) GetFile(filename string) *FileCoverage
GetFile retrieves file coverage by filename
type FileCoverage ¶
type FileCoverage struct {
FileName string
TotalLines int
CoveredLines int
CoveragePct float64
Functions []FunctionCoverage
Lines map[int]LineCoverage
}
FileCoverage represents coverage data for a single source file
func (*FileCoverage) CalculateCoverage ¶
func (fc *FileCoverage) CalculateCoverage()
CalculateCoverage calculates the coverage percentage for a file
type FunctionCoverage ¶
FunctionCoverage represents coverage data for a function
type LineCoverage ¶
LineCoverage represents coverage data for a single line
Click to show internal directories.
Click to hide internal directories.