Skip to content

Commit

Permalink
-Fix code coverage error
Browse files Browse the repository at this point in the history
  • Loading branch information
wgliang committed Oct 25, 2017
1 parent 605381f commit 91b1cc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/report2html.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (hd *HtmlData) converterCodeTest(structData Reporter) {
}
codeTestHtmlData.Summary.TotalTime, _ = strconv.ParseFloat(strconv.FormatFloat(totalTime, 'f', 1, 64), 64)
codeTestHtmlData.Summary.CodeCover, _ = strconv.ParseFloat(strconv.FormatFloat(result.Percentage, 'f', 1, 64), 64)
codeTestHtmlData.Summary.PackageCover, _ = strconv.ParseFloat(strconv.FormatFloat(float64(len(codeTestHtmlData.Content.Pkg))*1.0/float64(len(codeTestHtmlData.Content.Pkg)+len(codeTestHtmlData.Content.NoTest)), 'f', 1, 64), 64)
codeTestHtmlData.Summary.PackageCover, _ = strconv.ParseFloat(strconv.FormatFloat(100*float64(len(codeTestHtmlData.Content.Pkg))*1.0/float64(len(codeTestHtmlData.Content.Pkg)+len(codeTestHtmlData.Content.NoTest)), 'f', 1, 64), 64)
}

stringCodeTestJson, err := jsoniter.Marshal(codeTestHtmlData)
Expand Down

0 comments on commit 91b1cc0

Please sign in to comment.