views:

24

answers:

1

We're using AQTime's coverage profiler to check coverage results for unit tests. It seems to generally work okay, but has a nasty habit of overestimating coverage because some functions don't appear at all. I think this is because the linker has stripped them because they're not called, but obviously it is not ideal because I'd like them to show up as "not covered".

Does anyone know if there's a way to configure either Visual C++ or AQTime such that these functions will be correctly tagged as "not covered"?

+1  A: 

Odd. Whether the compiler/linker strips them or not, the fact is, at the end of test execution, there is no record of them being executed. So if the tool can list all the functions, it should have no such evidence, and thus it should report "not executed".

Our SD C++ Test Coverage tool does not have this bizarre behavior, at least not if you actually specify that the containing compilation unit or header file that is part of those that should be instrumented. (You might fail to list ah header file that contains a function body, and that won't then get reported). It will even report that a function, which has been inlined, has been executed, regardless of the number of places it has been inlined.

Ira Baxter