I have a strange coverage result in visual studio:
it appears as the if statement was not covered but since we did enter the block it must have been. Why are those results wrong? (those result cover many runs under many conditions)
I have a strange coverage result in visual studio: it appears as the if
Share
I suspect what you are seeing is branch coverage due to not testing all combinations that can result in going down each path. Logical AND (&&) allows early escape i.e. it only evaluates the second operator if the first is true.
e.g.
has 3 possibilities
you have probably only exercised #1 and #2