Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top