【软件测试_hw2】

1.Identify the fault.
1)for循环的结束条件应该为i>=0,否则会漏掉检查数组第一个元素。
2)应该从后往前遍历数组,即for(int i = x.lenght-1; i >= 0; i--)

2.If possible, identify a test case that does not execute the fault. (Reachability)
1)x = [], y = 3;
2)x = []

3.If possible, identify a test case that executes the fault, but does not result in an error state.
1)x = [5, 2, 4], y = 2;
2)x = [5]

  1. If possible identify a test case that results in an error, but not a failure.
  1. x = [5, 2, 4], y = 0;
  2. x = [0, 2, 5]
posted @ 2016-03-06 11:45  Lamba  阅读(235)  评论(0编辑  收藏  举报