White box testing, in general, and coverage criteria in particular, involve some
subtle concepts, so before I conclude this lesson, I want to have a
few more quizzes to make sure that we all understand these concepts.
The first one involves a very simple piece of code, a straight line
of code, three statements, in which we simply read an integer and
then prints 10 divided by the value of that integer minus 3. Now,
let's imagine that we have a test where there consists of three
test cases for this code, and what I'm showing in the test cases
is the input and the expected output. So for the first one,
the input is 1, and I expect the output to be minus 5.
For the second one, the input is minus 1, I'm expecting to
have 2.5. And for the third one, the input is 0, and I'm
expecting to have minus 3.3333 as the result. Now the first question
I want to ask, is if we considered this test suite, and we
run it on the code, does it achieve path coverage? And remember
that path coverage is one of the strongest coverage criteria that we saw.