- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using the codecov tool. One question: what kind of coverage is actually computed on block level?
We would like to state that we have 100% branch coverage (C1 in the literature). My question is how codecov handles the situation where an if statement does not have an else clause? E.g.,
if (decision) { SOME CODE STATEMENTS }
Will the block coverage reported for this block be 100% if we just test the case with decision = true, or is both true and false required for 100% block coverage?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good question. If it's necessary for codecov to assume that all blocks generated at the source position (like at if statement) are covered when at least one of the blocks is covered, then you can configure that using the -nopartial option. If you do, then the decision coverage is disabled for the if statement and the coverage adjusted accordingly. This way, you can get the codecov utility to treat partially covered code as covered fully. Hope that helps.
_Kittur

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page