软件测试 homework2

program1:

  • fault:i>0 ,应改为i>=0.
  • test1:x=[0,1,2];y=2
  • test2:x=[3];y=2
  • test3:x=[0,1,3];y=2

program2:

  • fault:for(int i=x.length-1;i>=0;i--)
  • test1:x=[]
  • test2:x=[1,2,3]
  • test3:x=[1,0,2]
原文地址:https://www.cnblogs.com/deerabby/p/5247980.html