NCrunch showing brace for a loop as untested

180 views Asked by At

Consider the block of code shown in the image below:

enter image description here

There is the one pesky black/'this line of code is not covered by any tests' dot.

Anyone able to shed any light on how this is not covered by any tests, considering it is referring to the closing brace of a foreach loop?

If the rest of the loop is covered (all green), surely the end brace is hit when exiting foreach?

1

There are 1 answers

2
Sergey Kalinichenko On BEST ANSWER

I never used NCrunch, but from my experience with other code coverage products I would guess that you do not have a test case where the loop is exited the "regular" way without hitting the break statement.