第二次作业

左边的:

error: for(int i=x.length-1; i>=0; i--)

@Test(expected=ArithmeticException.class) 
public void TestfindLast(){ 
assertEquals(0, new Calculate().findLast([2,3,5], 2)); 

右边的:

failure: for(int i=x.length-1; i>=0; i--)

@Test(expected=ArithmeticException.class) 
public void TestlastZero(){ 
assertEquals(2, new Calculate().findLast([0,1,0], 0)); 

 

posted on 2018-03-13 13:31  衍光  阅读(114)  评论(0)    收藏  举报