CalendarRegressionTest::test4031502()
{
    // This bug actually occurs on Windows NT as well, and doesn't
    // require the host zone to be set; it can be set in Java.
    UErrorCode status = U_ZERO_ERROR;
    StringEnumeration* ids = TimeZone::createEnumeration();
    if (ids == NULL) {
        dataerrln("Unable to create TimeZone Enumeration.");
        return;
    }
    UBool bad = FALSE;
    TimeZone* tz =TimeZone::createTimeZone("Asia/Riyadh87");
    failure(status, "new TimeZone");
    GregorianCalendar *cl = new GregorianCalendar(tz, status);
    if (U_FAILURE(status)) {
        dataerrln("Fail new GregorianCalendar: %s", u_errorName(status));
        delete tz;
        return;
    }
    cl->clear();
    cl->set(1900, 15, 5, 5, 8, 13);
    cl->get(UCAL_HOUR, status);
    failure(status, "cl->get(UCAL_HOUR, status)");
    status = U_ZERO_ERROR;
    delete cl;
    for (int32_t i=0; i<ids->count(status); ++i) {
        TimeZone *zone = TimeZone::createTimeZone(*ids->snext(status));
        GregorianCalendar *cal = new GregorianCalendar(zone, status);
        failure(status, "new GregorianCalendar");
        cal->clear();
        cal->set(1900, 15, 5, 5, 8, 13);
        if (cal->get(UCAL_HOUR, status) != 5 || U_FAILURE(status)) {
            UnicodeString temp;
            logln(zone->getID(temp) + " " +
                               //zone.useDaylightTime() + " " +
                               cal->get(UCAL_DST_OFFSET,status) / (60*60*1000) + " " +
                               zone->getRawOffset() / (60*60*1000) +
                               ": HOUR = " + cal->get(UCAL_HOUR,status));
            bad = TRUE;
        }
        delete cal;
    }
    if (bad)
        errln("TimeZone problems with GC");
    // delete [] ids;  // TODO: bad APIs
    delete ids;
}
CalendarRegressionTest::test4031502()
{
     
     
    UErrorCode status = U_ZERO_ERROR;
    StringEnumeration* ids = TimeZone::createEnumeration();
    if (ids == NULL) {
        dataerrln("Unable to create TimeZone Enumeration.");
        return;
    }
    UBool bad = FALSE;
    TimeZone* tz =TimeZone::createTimeZone("Asia/Riyadh87");
    failure(status, "new TimeZone");
    GregorianCalendar *cl = new GregorianCalendar(tz, status);
    if (U_FAILURE(status)) {
        dataerrln("Fail new GregorianCalendar: %s", u_errorName(status));
        delete tz;
        return;
    }
    cl->clear();
    cl->set(1900, 15, 5, 5, 8, 13);
    cl->get(UCAL_HOUR, status);
    failure(status, "cl->get(UCAL_HOUR, status)");
    status = U_ZERO_ERROR;
    delete cl;
    for (int32_t i=0; i<ids->count(status); ++i) {
        TimeZone *zone = TimeZone::createTimeZone(*ids->snext(status));
        GregorianCalendar *cal = new GregorianCalendar(zone, status);
        failure(status, "new GregorianCalendar");
        cal->clear();
        cal->set(1900, 15, 5, 5, 8, 13);
        if (cal->get(UCAL_HOUR, status) != 5 || U_FAILURE(status)) {
            UnicodeString temp;
            logln(zone->getID(temp) + " " +
                                
                               cal->get(UCAL_DST_OFFSET,status) / (60*60*1000) + " " +
                               zone->getRawOffset() / (60*60*1000) +
                               ": HOUR = " + cal->get(UCAL_HOUR,status));
            bad = TRUE;
        }
        delete cal;
    }
    if (bad)
        errln("TimeZone problems with GC");
     
    delete ids;
}