您的位置:首页 > 其它

Homework2 of Software Testing

2016-03-06 15:35 106 查看
Program1:



The fault is : for(int i=x.length-1;i>0;i--)

We should change i>0 into i>=0

identify a test case that does not execute the fault:x=null

identify a test case that executes the fault, but does not result in an error state: x[3]={2,3,5} y=5

identify a test case that results in an error, but not a failure: x[3]={2,3,5} y=6

program2:



The fault is : for(int i=0;i<x.length;i++)

We should change it into for(int i=x.length-1; i>=0;i--)

identify a test case that does not execute the fault: x=null

identify a test case that executes the fault, but does not result in an error state: x[3]={2,0,5}

identify a test case that results in an error, but not a failure: x[3]={2,3,5}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: