题目如图:
- Identify the fault
(1)i start 0, not 1.
(2) for return the first 0, not the last in x.
2. If possible, identify a test case that does not execute the fault.
(1) have no one
(2) have no one
3. If possible, identify a test case that executes the fault, but does not result in an error state.
(1) test: x = [1,2,3]; y=3
(2) test: x = [0,1,2];
4. If possible identify a test case that results in an error, but not a failure.
(1) test: x = [1,2,3]; y=4
(2) test: x = [1,1,2];