void CalendarRegressionTest::TestT6745()
{
    const CoptEthCalLocale * testLocalePtr;
    for ( testLocalePtr = copEthCalLocales; testLocalePtr->locale != NULL; ++testLocalePtr) {
        UErrorCode status = U_ZERO_ERROR;
        Calendar *cal = Calendar::createInstance(Locale(testLocalePtr->locale), status);
        if ( U_FAILURE(status) ) {
            dataerrln((UnicodeString)"FAIL: Calendar::createInstance, locale " + testLocalePtr->locale + ", status " + u_errorName(status));
            continue;
        }
        const CoptEthCalTestItem * testItemPtr;
        for (testItemPtr = coptEthCalTestItems; testItemPtr->fieldDelta != 0; ++testItemPtr) {
            status = U_ZERO_ERROR;
            cal->set( testItemPtr->startYear + testLocalePtr->yearOffset, testItemPtr->startMonth, testItemPtr->startDay, 9, 0 );
            cal->add( testItemPtr->fieldToChange, testItemPtr->fieldDelta, status );
            if ( U_FAILURE(status) ) {
                errln((UnicodeString)"FAIL: Calendar::add, locale " + testLocalePtr->locale + ", field/delta " +
                        testItemPtr->fieldToChange + "/" + testItemPtr->fieldDelta + ", status " + u_errorName(status));
                continue;
            }
            int32_t endYear = testItemPtr->endYear + testLocalePtr->yearOffset;
            int32_t year  = cal->get(UCAL_YEAR, status);
            int32_t month = cal->get(UCAL_MONTH, status);
            int32_t day   = cal->get(UCAL_DATE, status);
            if ( U_FAILURE(status) || year != endYear || month != testItemPtr->endMonth || day != testItemPtr->endDay ) {
                errln((UnicodeString)"ERROR: Calendar::add, locale " + testLocalePtr->locale + ", field/delta " +
                        testItemPtr->fieldToChange + "/" + testItemPtr->fieldDelta + ", status " + u_errorName(status) +
                        ", expected " + endYear + "/" + testItemPtr->endMonth + "/" + testItemPtr->endDay +
                        ", got " + year + "/" + month + "/" + day );
            }
        }
        delete cal;
    }
}
void CalendarRegressionTest::TestT6745()
{
    const CoptEthCalLocale * testLocalePtr;
    for ( testLocalePtr = copEthCalLocales; testLocalePtr->locale != NULL; ++testLocalePtr) {
        UErrorCode status = U_ZERO_ERROR;
        Calendar *cal = Calendar::createInstance(Locale(testLocalePtr->locale), status);
        if ( U_FAILURE(status) ) {
            dataerrln((UnicodeString)"FAIL: Calendar::createInstance, locale " + testLocalePtr->locale + ", status " + u_errorName(status));
            continue;
        }
        const CoptEthCalTestItem * testItemPtr;
        for (testItemPtr = coptEthCalTestItems; testItemPtr->fieldDelta != 0; ++testItemPtr) {
            status = U_ZERO_ERROR;
            cal->set( testItemPtr->startYear + testLocalePtr->yearOffset, testItemPtr->startMonth, testItemPtr->startDay, 9, 0 );
            cal->add( testItemPtr->fieldToChange, testItemPtr->fieldDelta, status );
            if ( U_FAILURE(status) ) {
                errln((UnicodeString)"FAIL: Calendar::add, locale " + testLocalePtr->locale + ", field/delta " +
                        testItemPtr->fieldToChange + "/" + testItemPtr->fieldDelta + ", status " + u_errorName(status));
                continue;
            }
            int32_t endYear = testItemPtr->endYear + testLocalePtr->yearOffset;
            int32_t year  = cal->get(UCAL_YEAR, status);
            int32_t month = cal->get(UCAL_MONTH, status);
            int32_t day   = cal->get(UCAL_DATE, status);
            if ( U_FAILURE(status) || year != endYear || month != testItemPtr->endMonth || day != testItemPtr->endDay ) {
                errln((UnicodeString)"ERROR: Calendar::add, locale " + testLocalePtr->locale + ", field/delta " +
                        testItemPtr->fieldToChange + "/" + testItemPtr->fieldDelta + ", status " + u_errorName(status) +
                        ", expected " + endYear + "/" + testItemPtr->endMonth + "/" + testItemPtr->endDay +
                        ", got " + year + "/" + month + "/" + day );
            }
        }
        delete cal;
    }
}