zeko77;16942 wrote:The only issue I am experiencing now is that record data types are marked with black No covering tests marker.
Thanks for sharing this.
I've taken a look at this issue and determined that there isn't much we can practically do about it, as the problem isn't in NCrunch.
The record types are largely compiler generated structures. Inside the IL structure there is a secondary constructor that is used for cloning instances of the type when the new 'with' keyword is used. For reasons unknown, the compiler chooses to represent a single line of code in this constructor as having an actual sequence point in the PDB. You'll find that if you use the 'with' keyword on the type, it's actually possible to have the runtime execute this line of code and it will be marked as covered by NCrunch. You can also hit it with a breakpoint using the debugger.
It is technically possible for us to try and implement something that would suppress specific sequence points when processing PDBs, but this is not without cost. Adding special exceptions to coverage tracking reduces the performance of NCrunch's instrumentation and it increases the risk of things going wrong or breaking in future. It does also run counter to NCrunch's goal of reporting what is actually happening in the runtime rather than in our fabricated viewpoint of it.
If the black dot is an issue, I recommend writing a test to exercise the cloning of the structure using the 'with' keyword.