calculation

package
v0.0.0-...-d7867ec Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package calculation calculates coverage through summarizing and filtering.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coverage

type Coverage struct {
	Name            string
	NumCoveredStmts int
	NumAllStmts     int
}

Coverage stores test coverage summary data for one file

func (*Coverage) Ratio

func (c *Coverage) Ratio() float32

Ratio returns the percentage of statements that are covered

type CoverageList

type CoverageList struct {
	*Coverage
	Group []Coverage
}

CoverageList is a collection and summary over multiple file Coverage objects

func ProduceCovList

func ProduceCovList(profiles []*cover.Profile) *CoverageList

ProduceCovList summarizes profiles and returns the result

func (CoverageList) ListDirectories

func (covList CoverageList) ListDirectories() []string

ListDirectories gets a list a sub-directories that contains source code.

func (*CoverageList) Ratio

func (covList *CoverageList) Ratio() float32

Ratio summarizes the list of coverages and returns the summarized ratio

func (*CoverageList) Subset

func (covList *CoverageList) Subset(prefix string) *CoverageList

Subset returns the subset obtained through applying filter

Jump to

Keyboard shortcuts

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