软件测试homework2

1.1 for (int i=x.length-1; i > 0; i--)没有遍历整个数组, 应该为for (int i=x.length-1; i >= 0; i--) 。
1.2 test: x=[3, 2, 5]; y = 2 。
1.3 test: x=[3, 3, 5]; y = 2 。
1.4 test: x = [  2 ],y = 2。 

 

2.1 for 循环应改为for(i = x.length -1 ; i >= 0; i--)

2.2 test: x = [0, 2]

2.3 test: x = [2, 0, 0]

2.4 test: x = [0] 

posted @ 2016-03-08 22:34  The_shy  阅读(126)  评论(0编辑  收藏  举报