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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top