Software Testing Homework2

the fault in the section of code result in that the loop cannot reach the first element of the given array.
1)a test case that does not execute the fault
x=null
2)a test case that executes the fault, but does not result in an error state.
x=[2,3,4] y=3
return 1
3)a test case that results in an error, but not a fault
x=[3,3,4] y=2
return -1

since we want to find the last zero, it's supposed to retrieve from tail.
1)a test case that does not execute the fault
x=[0]
2)a test case that executes the fault, but does not result in an error state.
x=[0,1,2]
return 0
3)a test case that results in an error, but not a fault
x=[3,3,4]
return -1

浙公网安备 33010602011771号