Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Multiline expressions only have a marker on the first line, creating conspicuous blank space
Strilanc
#1 Posted : Monday, October 22, 2012 1:47:55 AM(UTC)
Rank: Member

Groups: Registered
Joined: 4/3/2012(UTC)
Posts: 17

Thanks: 1 times
When an expression covers several lines, it creates a blank area that stands out to my eyes. It looks visually similar to the way things look before ncrunch has parsed the expression at all. See the attached screenshot for an example of something that looks "off", at least to my eyes.

[img=http://imgur.com/J0gar]Screenshot[/img]
Remco
#2 Posted : Monday, October 22, 2012 6:38:32 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for sharing this issue!

The reason behind this is that the resolution of NCrunch's code coverage is constrained by the debugging information emitted by the language compiler. In this particular circumstance (i.e. chained LINQ expression), the compiler isn't emitting debug information for the chained method calls that make up the statement, and thus NCrunch cannot differentiate between the lines and treats them as an individual line of code.

The effect of this is also very noticeable when using a debugger. You may find that it's impossible to place a breakpoint under any of the individually chained method calls - as the debug information simply isn't there in the PDB file.

On principle though, I certainly agree that this looks out of place. It would be more useful if the resolution of the code coverage was able to differentiate between the method calls, thus allowing you to observe the logic flow between them.

Unfortunately, there isn't really a way to correct this problem without changing the C# compiler (or entirely decoupling NCrunch from it, and using a different method - which would be quite a bit of work!).


Cheers,

Remco
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.026 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download