int len = tests.length;
for (int index = 0; index < len; index++) {
DateAndWeekNumber test = tests[index];
int weekNumber = test.date.getWeekNumber();
if (weekNumber != test.expectedWeekNumber) {
long millis = test.date.toMillis(false /* use isDst */);
int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NUMERIC_DATE;
String output = DateUtils.formatDateTime(mContext, millis, flags);
Log.i("WeekNumberTest", "index " + index
+ " date: " + output
+ " expected: " + test.expectedWeekNumber
+ " actual: " + weekNumber);
}
assertEquals(weekNumber, test.expectedWeekNumber);
weekNumber = test.allDayDate.getWeekNumber();
if (weekNumber != test.expectedWeekNumber) {
long millis = test.date.toMillis(false /* use isDst */);
int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NUMERIC_DATE;
String output = DateUtils.formatDateTime(mContext, millis, flags);
Log.i("WeekNumberTest", "(all-day) index " + index
+ " date: " + output
+ " expected: " + test.expectedWeekNumber
+ " actual: " + weekNumber);
}
assertEquals(weekNumber, test.expectedWeekNumber);
}