软件项目测试作业2

一.

1.会漏掉数组第一个元素,应该设置为i >= 0。

2.test case: x = [], y = 2

3.test case: x = [3,2,5], y = 2

4.test case: x = [3,2,5], y = 0

二.

1.寻找最后一个0应该从最后一位开始检查,应为for( int i = x.length-1 ; i >= 0 ; i-- )

2.test case: x = []

3.test case: x = [3]

4.test case: x = [0,2,2]

posted @ 2016-03-10 22:47  盟军的次时代  阅读(86)  评论(0编辑  收藏  举报