calc

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package calc contains the various coverage calculator implementations.

Index

Constants

View Source
const StrategyLines = "lines"
View Source
const StrategyStatements = "statements"
View Source
const VHead = "latest"

Variables

View Source
var Issue5Failing []byte

Functions

This section is empty.

Types

type Calculator

type Calculator interface {
	CoverageByPackage([]*cover.Profile) CoverageSummary
}

func New

func New(version string) (Calculator, error)

type CoverageByFile

type CoverageByFile map[string]map[string]CoverageCounts

CoverageByFile represents the statement coverage after parsing as a map[package]map[file]coverage.

type CoverageByFileLines

type CoverageByFileLines map[string]map[string]map[int]bool

CoverageByFileLines represents the line coverage after parsing as a map[package]map[file]map[line]covered.

type CoverageCounts

type CoverageCounts struct{ Covered, Uncovered int }

func (CoverageCounts) Decimal

func (cc CoverageCounts) Decimal() int

func (CoverageCounts) Float added in v0.0.4

func (cc CoverageCounts) Float() float64

type CoverageSummary

type CoverageSummary []CoverageSummaryElement

CoverageSummary is a per-package coverage summary

type CoverageSummaryElement

type CoverageSummaryElement struct {
	Package  string
	Coverage int // Rounded integer ratio to 1000, e.g. 0.9016 -> 902.
	CoverageCounts
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL