CalendarRegressionTest::Test9019()
{
    UErrorCode status = U_ZERO_ERROR;
    LocalPointer<GregorianCalendar> cal1(new GregorianCalendar(status), status);
    LocalPointer<GregorianCalendar> cal2(new GregorianCalendar(status), status);
    if(U_FAILURE(status)) {
      dataerrln("Error creating Calendar: %s", u_errorName(status));
      return;
    }
    cal1->set(UCAL_HOUR, 1);
    cal2->set(UCAL_HOUR,2);
    cal1->clear();
    cal2->clear();
    failure(status, "new GregorianCalendar");
    cal1->set(2011,UCAL_MAY,06);
    cal2->set(2012,UCAL_JANUARY,06);
    printdate(cal1.getAlias(), "cal1: ") ;
    cal1->setLenient(FALSE);
    cal1->add(UCAL_MONTH,8,status);
    failure(status, "->add(UCAL_MONTH,8)");
    printdate(cal1.getAlias(), "cal1 (lenient) after adding 8 months:") ;
    printdate(cal2.getAlias(), "cal2 (expected date):") ;

    if(!cal1->equals(*cal2,status)) {
      errln("Error: cal1 != cal2.\n");
    }
    failure(status, "equals");
}
CalendarRegressionTest::Test9019()
{
    UErrorCode status = U_ZERO_ERROR;
    LocalPointer<GregorianCalendar> cal1(new GregorianCalendar(status), status);
    LocalPointer<GregorianCalendar> cal2(new GregorianCalendar(status), status);
    if(U_FAILURE(status)) {
      dataerrln("Error creating Calendar: %s", u_errorName(status));
      return;
    }
    cal1->set(UCAL_HOUR, 1);
    cal2->set(UCAL_HOUR,2);
    cal1->clear();
    cal2->clear();
    failure(status, "new GregorianCalendar");
    cal1->set(2011,UCAL_MAY,06);
    cal2->set(2012,UCAL_JANUARY,06);
    printdate(cal1.getAlias(), "cal1: ") ;
    cal1->setLenient(FALSE);
    cal1->add(UCAL_MONTH,8,status);
    failure(status, "->add(UCAL_MONTH,8)");
    printdate(cal1.getAlias(), "cal1 (lenient) after adding 8 months:") ;
    printdate(cal2.getAlias(), "cal2 (expected date):") ;

    if(!cal1->equals(*cal2,status)) {
      errln("Error: cal1 != cal2.\n");
    }
    failure(status, "equals");
}