1 /**
2 This test tests the addDays method with positive
3 parameters.
4 */
5 public class TestAdd implements TestCase
6 {
7 public void execute()
8 {
9 for (int i = 1; i <= MAX_DAYS; i = i * INCREMENT)
10 {
11 Day d1 = new Day(1970, 1, 1);
12 Day d2 = d1.addDays(i);
13 assertEquals(i, d2.daysFrom(d1));
14 }
15 }
16
17 private static final int MAX_DAYS = 10000;
18 private static final int INCREMENT = 10;
19 }