Commit bc1410a4 authored by Rob Pike's avatar Rob Pike

cmd/cover: try once again to fix the build

Forgot to update the references to the old cover package. No excuse.

Change-Id: If17b7521f0bf70bc0c8da9c5adf246d90f644637
Reviewed-on: https://go-review.googlesource.com/9564Reviewed-by: default avatarRob Pike <r@golang.org>
parent e0820ac8
......@@ -31,7 +31,7 @@ import (
// total: (statements) 91.9%
func funcOutput(profile, outputFile string) error {
profiles, err := cover.ParseProfiles(profile)
profiles, err := ParseProfiles(profile)
if err != nil {
return err
}
......@@ -128,7 +128,7 @@ func (v *FuncVisitor) Visit(node ast.Node) ast.Visitor {
}
// coverage returns the fraction of the statements in the function that were covered, as a numerator and denominator.
func (f *FuncExtent) coverage(profile *cover.Profile) (num, den int64) {
func (f *FuncExtent) coverage(profile *Profile) (num, den int64) {
// We could avoid making this n^2 overall by doing a single scan and annotating the functions,
// but the sizes of the data structures is never very large and the scan is almost instantaneous.
var covered, total int64
......
......@@ -22,7 +22,7 @@ import (
// coverage report, writing it to outfile. If outfile is empty,
// it writes the report to a temporary file and opens it in a web browser.
func htmlOutput(profile, outfile string) error {
profiles, err := cover.ParseProfiles(profile)
profiles, err := ParseProfiles(profile)
if err != nil {
return err
}
......@@ -85,7 +85,7 @@ func htmlOutput(profile, outfile string) error {
// percentCovered returns, as a percentage, the fraction of the statements in
// the profile covered by the test run.
// In effect, it reports the coverage of a given source file.
func percentCovered(p *cover.Profile) float64 {
func percentCovered(p *Profile) float64 {
var total, covered int64
for _, b := range p.Blocks {
total += int64(b.NumStmt)
......@@ -101,7 +101,7 @@ func percentCovered(p *cover.Profile) float64 {
// htmlGen generates an HTML coverage report with the provided filename,
// source code, and tokens, and writes it to the given Writer.
func htmlGen(w io.Writer, src []byte, boundaries []cover.Boundary) error {
func htmlGen(w io.Writer, src []byte, boundaries []Boundary) error {
dst := bufio.NewWriter(w)
for i := range src {
for len(boundaries) > 0 && boundaries[0].Offset == i {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment