]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cover: try once again to fix the build
authorRob Pike <r@golang.org>
Fri, 1 May 2015 02:14:45 +0000 (19:14 -0700)
committerRob Pike <r@golang.org>
Fri, 1 May 2015 02:15:46 +0000 (02:15 +0000)
Forgot to update the references to the old cover package. No excuse.

Change-Id: If17b7521f0bf70bc0c8da9c5adf246d90f644637
Reviewed-on: https://go-review.googlesource.com/9564
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/cover/cover [deleted file]
src/cmd/cover/func.go
src/cmd/cover/html.go

diff --git a/src/cmd/cover/cover b/src/cmd/cover/cover
deleted file mode 100755 (executable)
index 5e1b990..0000000
Binary files a/src/cmd/cover/cover and /dev/null differ
index d5a41305ac122a22fe50d59a5c3b4bfbe6f10ca4..66ec242a402a9505822c143213bbd45b4b26bbb7 100644 (file)
@@ -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
index a9a6a3a04f9eb4c3e39a5e7f6f37ae60a18db1de..bb0a495ae7214acc3f8734f6b2d3a9df1f5bf3fa 100644 (file)
@@ -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 {