Well I am using opencover to generate the coverage report for the cpp code in html format. The report produced by the open cover seems to be like the amount of code covered by each test method as said in this post.
First screenshot:
Second screenshot:
.
As seen in the second screenshot the coverage report is shown for the test project calctest.cpp
but I want coverage report for the actual source file calc.cpp
which is included in its header.
What I wanna to be shown is like as seen in calctest.cpp
there two methods sum and mul in the calc.cpp
and this two methods should be displayed in the first screenshot instead of the testmethod1, testmethod2,etc.
I think I made it clear or am I understanding incorrectly.
EDIT:
I think I am facing the same issue like this
UPDATE:
As said by Shaun Wilde in the link mentioned in the edit, on checking the .xml generated by opencover I couldn't find my source project name i.e CalcProject.lib
in it, it only has the test project by name CalcTest.dll
. And there are certain module tag with following statements
<Module skippedDueTo="Filter" hash="E9-A8-6A-CC-31-FF-25-91-E6-86-F2-D5-72-EE-77-7D-AB-36-F0-0B">
<FullName>C:\WINDOWS\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll</FullName>
<ModuleName>mscorlib</ModuleName>
<Classes />
</Module>
The full .xml output cab be found here