void CalendarRegressionTest::test4096539()
{
    UErrorCode status = U_ZERO_ERROR;
    int32_t y [] = {31,28,31,30,31,30,31,31,30,31,30,31};

    for (int32_t x=0;x<12;x++) {
        GregorianCalendar *gc = new
            GregorianCalendar(1997,x,y[x], status);
        if (U_FAILURE(status)) {
            dataerrln("Fail new GregorianCalendar: %s", u_errorName(status));
            delete gc;
            return;
        }
        int32_t m1,m2;
        log(UnicodeString("") + (m1=gc->get(UCAL_MONTH,status)+1)+UnicodeString("/")+
                         gc->get(UCAL_DATE,status)+"/"+gc->get(UCAL_YEAR,status)+
                         " + 1mo = ");

        gc->add(UCAL_MONTH, 1,status);
        logln(UnicodeString("") + (m2=gc->get(UCAL_MONTH,status)+1)+UnicodeString("/")+
                           gc->get(UCAL_DATE,status)+"/"+gc->get(UCAL_YEAR,status)
                           );
        int32_t m = (m1 % 12) + 1;
        if (m2 != m)
            errln(UnicodeString("Fail: Want ") + m + " Got " + m2);
        delete gc;
    }

}
void CalendarRegressionTest::test4096539()
{
    UErrorCode status = U_ZERO_ERROR;
    int32_t y [] = {31,28,31,30,31,30,31,31,30,31,30,31};

    for (int32_t x=0;x<12;x++) {
        GregorianCalendar *gc = new
            GregorianCalendar(1997,x,y[x], status);
        if (U_FAILURE(status)) {
            dataerrln("Fail new GregorianCalendar: %s", u_errorName(status));
            delete gc;
            return;
        }
        int32_t m1,m2;
        log(UnicodeString("") + (m1=gc->get(UCAL_MONTH,status)+1)+UnicodeString("/")+
                         gc->get(UCAL_DATE,status)+"/"+gc->get(UCAL_YEAR,status)+
                         " + 1mo = ");

        gc->add(UCAL_MONTH, 1,status);
        logln(UnicodeString("") + (m2=gc->get(UCAL_MONTH,status)+1)+UnicodeString("/")+
                           gc->get(UCAL_DATE,status)+"/"+gc->get(UCAL_YEAR,status)
                           );
        int32_t m = (m1 % 12) + 1;
        if (m2 != m)
            errln(UnicodeString("Fail: Want ") + m + " Got " + m2);
        delete gc;
    }

}