Let's assume that we have a code like this:
switch(y)
{
case 1: case 2: case 3:
function();
break;
case 4: case 5: case 6:
function_2();
break;
}
Can we get the CC value as 6+1 here? Why a value of 1 is added? If the CC value is considered as 7, is that the number of independent paths?
What if a fall through scenario is considered above? As only possible two unique paths are there, 2 +1 =3
Which of the above are correct or are the both of them correct?