Skip to content

Commit

Permalink
Round coverage percentages down
Browse files Browse the repository at this point in the history
Resolves #172.
  • Loading branch information
aantron committed Mar 23, 2019
1 parent ee9cb70 commit dd26614
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/report/report_html.ml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ let output_html_index verbose title filename l =
" </div>" ;
" <div id=\"files\">"]
[ "title", title ;
"percentage", Printf.sprintf "%.02f" (percentage stats) ]
"percentage",
Printf.sprintf "%.02f"
(floor ((percentage stats) *. 100.) /. 100.) ]
channel;

let per_file (name, html_file, stats) =
Expand All @@ -95,7 +97,7 @@ let output_html_index verbose title filename l =
" <span class=\"dirname\">$(dir)</span>$(name)";
" </a>";
" </div>"]
["p", Printf.sprintf "%.00f" (percentage stats);
["p", Printf.sprintf "%.00f" (floor (percentage stats));
"link", relative_html_file;
"dir", dirname;
"name", basename]
Expand Down

0 comments on commit dd26614

Please sign in to comment.