public void testInputYear(){ boolean result=true; int year=Compounding.InputYear(-1); if(year<0||year>100) result= false; else result=true; assertEquals(false, true); }
不知道哪里错误,每次的测试都是红色条条。
@Test public void testCompoundYear() { int compoundYear = Compounding.compoundYear(1000000, 0.1, 2000000); assertEquals(7, compoundYear); }
时间: 2024-10-13 11:32:02