The second homework of ST
In this program, the fault is that i>0 in the for cycle, it should be i>=0;
A test case like x=null can achieve the reachability.
A test case like x=[2,3,4], y=3, can execute the fault, but does not result in a error state;
A test case like x=[2,3,4], y=20, can result in a error, but not a failure.
In this program, it will find the first 0 in x. The FOR statement should be:
for(int i = x.length-1; i>=0; i--);
A test case like x=null can achieve the reachability.
A test case like x=[0,1,2], can execute the fault, but does not result in a error state;
A test case like x=[2,3,4], can result in a error, but not a failure.