1

I'm trying to perform code coverage on several methods implemented in an interface based on templates (I know, it's a bit weird).

The issue is that, testing with both lcov and gcov I get some extremely strange coverage results, where some functions are covered and others are not (when all are based on templates and have a similar operation), the tests are quite complete and I can ensure that those lines are covered during testing (debugging with logs).

I know that the code coverage is not intended to test code at compile time, but the fact that some functions do appear in green has me a little bit confused.

Is it maybe a bug in gcov and lcov or am I missing something?

AdCerros
  • 153
  • 1
  • 1
  • 11
  • 1
    Probably inlining is messing up your results. Maybe try some of the alternatives mentioned here: https://stackoverflow.com/q/9666800/4641116 – Eljay Jun 13 '23 at 14:07

0 Answers0