今天学习了软件测试的相关内容并且做了部分习题,特地来和大家分享一下
参考答案
1.
1.
i>0 -> i>= 0
2.
test: x=null; y=5
3.
test: x=[2,3,5]; y=5
4.
test: x=[2,3,5]; y=10
2.
1.
for(int x=0;i < x.length; i++) -> for(int x=length-1; i>=0;i--)
2.
all case will execute the fault
3.
test: x=null;
4,
test: x=[2,0,2];
关于Fault Error Failure的详细解释可以参考以下网址:
http://blog.sciencenet.cn/blog-512253-413444.html
以上链接来自穆春阳科学网博客