gcovinator Coverage Report

<% if @total_lines > 0 %> <% else %> <% end %> <% if @total_branches > 0 %> <% else %> <% end %>
Line Coverage:<%= @covered_lines %> / <%= @total_lines %> = <%= (100.0 * @covered_lines / @total_lines).to_i %>%-
Branch Coverage:<%= @covered_branches %> / <%= @total_branches %> = <%= (100.0 * @covered_branches / @total_branches).to_i %>%-

<% file_reports.sort_by(&:source_file_name).each_with_index do |file_report, i| %> <% if file_report.total_lines > 0 %> <% if file_report.covered_lines == file_report.total_lines %> <% row_coverage_style = "covered" %> <% else %> <% row_coverage_style = "uncovered" %> <% end %> <% else %> <% row_coverage_style = "normal" %> <% end %> <% evenodd = i & 1 == 0 ? 'even' : 'odd' %> <% if file_report.total_branches > 0 %> <% if file_report.covered_branches == file_report.total_branches %> <% branch_coverage_style = "covered-#{evenodd}" %> <% else %> <% branch_coverage_style = "uncovered-#{evenodd}" %> <% end %> <% else %> <% branch_coverage_style = nil %> <% end %> <% end %>
BC LC File
<% if file_report.total_branches > 0 %> <%= file_report.covered_branches %> / <%= file_report.total_branches %> = <%= (100.0 * file_report.covered_branches / file_report.total_branches).to_i %>% <% else %> - <% end %> <% if file_report.total_lines > 0 %> <%= file_report.covered_lines %> / <%= file_report.total_lines %> = <%= (100.0 * file_report.covered_lines / file_report.total_lines).to_i %>% <% else %> - <% end %> <%= file_report.source_file_name %>