Quantcast
Channel: opencppcoverage Discussions Rss Feed
Viewing all articles
Browse latest Browse all 235

New Post: Can you Include other files in code coverage percentages?

$
0
0
Hello,

If I understand correctly this should already be the case.

For example, consider the following 3 files.
// Main.cpp
int main(int argc, char **argv) 
{
    return 0;
}

// Bar.cpp
void Bar() {}

//Foo.cpp
void Foo() {}
If you run code coverage on these files you will have:
  • Main.cpp: 3/3 100%
  • Bar.cpp: 0/1 0%
  • Foo.cpp 0/1 0%.
For the whole module the coverage is 3 / (3 + 1 + 1) = 60%.
File Bar.cpp is not touched by any test but part of the coverage.

I suspect this is not what you want. Can you provide a full example as I did?

I hope this will help,

OpenCppCoverage

Viewing all articles
Browse latest Browse all 235

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>