aboutsummaryrefslogtreecommitdiff
path: root/tests/src/com/android
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/com/android')
-rw-r--r--tests/src/com/android/calendarcommon/RecurrenceProcessorTest.java32
1 files changed, 31 insertions, 1 deletions
diff --git a/tests/src/com/android/calendarcommon/RecurrenceProcessorTest.java b/tests/src/com/android/calendarcommon/RecurrenceProcessorTest.java
index 9f6f13a..2ca2d35 100644
--- a/tests/src/com/android/calendarcommon/RecurrenceProcessorTest.java
+++ b/tests/src/com/android/calendarcommon/RecurrenceProcessorTest.java
@@ -378,7 +378,7 @@ public class RecurrenceProcessorTest extends TestCase {
null /* rdate */, null /* exrule */, null /* exdate */,
"20060101T000000", "20101231T000000",
new String[]{
- "20060101T100000",
+ "20060101T100000", // TODO: this is wrong (bug in recurrence gen)
"20060113T100000",
"20061013T100000",
"20070413T100000",
@@ -392,6 +392,36 @@ public class RecurrenceProcessorTest extends TestCase {
}
@SmallTest
+ public void testMonthly14() throws Exception {
+ verifyRecurrence("20110103T100000", "FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=1,-1",
+ null /* rdate */, null /* exrule */, null /* exdate */,
+ "20110101T000000", "20110331T235959",
+ new String[]{
+ "20110103T100000",
+ "20110131T100000",
+ "20110201T100000",
+ "20110228T100000",
+ "20110301T100000",
+ "20110331T100000",
+ });
+ }
+
+ @SmallTest
+ public void testMonthly15() throws Exception {
+ verifyRecurrence("20110703T100000", "FREQ=MONTHLY;BYDAY=SA,SU;BYSETPOS=2,-2",
+ null /* rdate */, null /* exrule */, null /* exdate */,
+ "20110701T000000", "20110931T235959",
+ new String[]{
+ "20110703T100000",
+ "20110730T100000",
+ "20110807T100000",
+ "20110827T100000",
+ "20110904T100000",
+ "20110924T100000",
+ });
+ }
+
+ @SmallTest
public void testWeekly0() throws Exception {
verifyRecurrence("20060215T100000", "FREQ=WEEKLY;COUNT=3",
null /* rdate */, null /* exrule */, null /* exdate */,