~ubuntu-branches/ubuntu/gutsy/icu/gutsy

« back to all changes in this revision

Viewing changes to source/test/intltest/tzregts.cpp

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2005-05-21 22:44:31 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: package-import@ubuntu.com-20050521224431-r7rktfhnu1n4tf1g
Tags: 2.1-2.1
Rename icu-doc to icu21-doc. icu-doc is built by the icu28 package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
658
658
    
659
659
    int32_t DATA [] = {
660
660
        1, GOOD,
661
 
        0, GOOD,
 
661
        0, BAD,
662
662
        -1, BAD,
663
663
        60*60*1000, GOOD,
664
664
        INT32_MIN, BAD,
855
855
 */
856
856
void TimeZoneRegressionTest::TestJ186() {
857
857
    UErrorCode status = U_ZERO_ERROR;
 
858
    // NOTE: Setting the DST savings to zero is illegal, so we
 
859
    // are limited in the testing we can do here.  This is why
 
860
    // lines marked //~ are commented out.
858
861
    SimpleTimeZone z(0, "ID");
859
 
    z.setDSTSavings(0, status); // Must do this!
 
862
    //~z.setDSTSavings(0, status); // Must do this!
860
863
    z.setStartRule(Calendar::FEBRUARY, 1, Calendar::SUNDAY, 0, status);
861
864
    failure(status, "setStartRule()");
862
865
    if (z.useDaylightTime()) {
863
866
        errln("Fail: useDaylightTime true with start rule only");
864
867
    }
865
 
    if (z.getDSTSavings() != 0) {
866
 
        errln("Fail: dst savings != 0 with start rule only");
867
 
    }
 
868
    //~if (z.getDSTSavings() != 0) {
 
869
    //~    errln("Fail: dst savings != 0 with start rule only");
 
870
    //~}
868
871
    z.setEndRule(Calendar::MARCH, -1, Calendar::SUNDAY, 0, status);
869
872
    failure(status, "setStartRule()");
870
873
    if (!z.useDaylightTime()) {