mcatan      2004/04/05 13:55:12

  Modified:    tests/src drfatestcase.cpp
  Log:
  fixed tests for windows
  
  Revision  Changes    Path
  1.4       +6 -8      logging-log4cxx/tests/src/drfatestcase.cpp
  
  Index: drfatestcase.cpp
  ===================================================================
  RCS file: /home/cvs/logging-log4cxx/tests/src/drfatestcase.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- drfatestcase.cpp  2 Apr 2004 09:02:34 -0000       1.3
  +++ drfatestcase.cpp  5 Apr 2004 20:55:12 -0000       1.4
  @@ -33,14 +33,14 @@
        {
                RollingCalendar rc;
           
  -             /*CPPUNIT_ASSERT_EQUAL(RollingCalendar::TOP_OF_DAY,
  +             CPPUNIT_ASSERT_EQUAL(RollingCalendar::TOP_OF_DAY,
                        rc.computeTriggeringPeriod(_T("%Y-%m-%d.log")));
        
                CPPUNIT_ASSERT_EQUAL(RollingCalendar::TOP_OF_MINUTE,
                        rc.computeTriggeringPeriod(_T("%Y-%m-%d %M.log")));
   
                CPPUNIT_ASSERT_EQUAL(RollingCalendar::TOP_OF_HOUR,
  -                     rc.computeTriggeringPeriod(_T("%Y-%m-%d %H.log")));*/
  +                     rc.computeTriggeringPeriod(_T("%Y-%m-%d %H.log")));
       
                CPPUNIT_ASSERT_EQUAL(RollingCalendar::TOP_OF_MONTH,
                        rc.computeTriggeringPeriod(_T("%Y-%m.log")));
  @@ -149,14 +149,14 @@
                                                
                                                if (dltState0 == dltState1)
                                                {
  -                                                     CPPUNIT_ASSERT_EQUAL((h 
+ 1) % 24, nextTime->tm_hour);
  +                                                     
CPPUNIT_ASSERT_EQUAL((tm.tm_hour + 1) % 24, nextTime->tm_hour);
                                                } 
                                                else 
                                                {
                                                        // returning to 
standard time
                                                        if (dltState0) 
                                                        {
  -                                                             
CPPUNIT_ASSERT_EQUAL(h, nextTime->tm_hour);
  +                                                             
CPPUNIT_ASSERT_EQUAL(tm.tm_hour, nextTime->tm_hour);
                                                        } 
                                                        else 
                                                        {
  @@ -164,9 +164,9 @@
                                                        }
                                                }
   
  -                                             if (h == 23)
  +                                             if (tm.tm_hour == 23)
                                                {
  -                                                     CPPUNIT_ASSERT_EQUAL((d 
+ 1) % 32, nextTime->tm_mday);
  +                                                     CPPUNIT_ASSERT_EQUAL(d 
% 31 + 1, nextTime->tm_mday);
                                                        if (d == 31)
                                                        {
                                                                
CPPUNIT_ASSERT_EQUAL((M31[i] + 1) % 12, nextTime->tm_mon);
  @@ -187,7 +187,5 @@
                }
        }
   };
  -
  -
   
   CPPUNIT_TEST_SUITE_REGISTRATION(DRFATestCase);
  
  
  

Reply via email to