Jun 28, 2016 at 6:18 AM
Edited Jun 28, 2016 at 11:59 AM
I'm not in one of the two cases you listed.
BUT: I'm not able to put a breakpoint to the functions I'm missing. Message while debugging is: "The breakpoint will not currently be hit. No executable code of the debugger's target code type".
So I think this is the reason for the missing "Executable lines". I disabled all compiler optimization and tried different compiler and linker flag with no success.
I see, this is not a bug. Anyway I'm unsatisfied with this behavior. In my current situation with a large bunch of untested c++ code, OpenCppCoverage gives me a wrong indication about untested (uncovered) and tested (covered) code.
With your knowledge about code coverage: Do you have an idea how to track the "not executable lines" of code and add them to the count of uncovered lines?
After brainstorming with my colleague we found a workaround for my problem. It's ugly but it works.
I created a test class named ForCorrectCoverageOnly with one test method named doItForTheCoverage. In this method I call all uncovered functions from an if statement that will always be true and can't get optimized by the compiler.
Anyway this is just a workaround and I don't like this solution. So my question to you is still relevant.
Thanks and regards