第二次作业
左边的:
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));
}
浙公网安备 33010602011771号