Skip to content

Branch coverage is reported wrongly #105

@theold190

Description

@theold190

In some cases you might have 0 branches in all files. In that case branch coverage is reported differently in a HTML report:

  • per file it is reported as 100%, 0/0
  • per module it is reported as exec:0, total:0, coverage: 0%

It looks like 0% value is selected to avoid the zero division. An extra check could be added to show a proper statistics information.

Tested with official gcovr 3.2 release.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions