Question: Given the following function: int ex1 (int x, int y) { int z=0; if (x?3 && y? 5){ z=1; x= y-x; if (y == 5
Given the following function:
int ex1 (int x, int y) { int z=0; if (x?3 && y? 5){ z=1; x= y-x; if (y == 5 || z?y){ z:= 2; y:=z; } }else{ if (x==3 && y ? z){ z=0; y=x; } } y=z; } Generate a test suite which gives the maximum coverage with the statement coverage criterion.
Exercise 2
Write a simple piece of code (pseudo-code is also fine), for which it is impossible to reach 100% statement coverage.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
