apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: apr/test testtime.c
Date Fri, 08 Nov 2002 05:36:58 GMT
rbb         2002/11/07 21:36:57

  Modified:    test     testtime.c
  Log:
  This test was bogus, I copied and pasted, and I forgot to remove the check
  of the string.  So, remove that test and add a valid one.
  
  Revision  Changes    Path
  1.37      +10 -3     apr/test/testtime.c
  
  Index: testtime.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testtime.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- testtime.c	23 Oct 2002 14:51:18 -0000	1.36
  +++ testtime.c	8 Nov 2002 05:36:57 -0000	1.37
  @@ -254,15 +254,23 @@
   {
       apr_status_t rv;
       apr_time_exp_t xt;
  -    char str[STR_SIZE];
       apr_int32_t hr_off = -5 * 3600; /* 5 hours in seconds */
  +    apr_time_exp_t expnow = { 186711, 36, 5, 14, 14, 8, 102, 6, 256, 0, -18000 };
   
       rv = apr_time_exp_tz(&xt, now, hr_off);
       if (rv == APR_ENOTIMPL) {
           CuNotImpl(tc, "apr_time_exp_tz");
       }
       CuAssertTrue(tc, rv == APR_SUCCESS);
  -    CuAssertStrEquals(tc, "19:05:36", str);
  +    CuAssertTrue(tc, (xt.tm_usec == 186711) && 
  +                     (xt.tm_sec == 36) &&
  +                     (xt.tm_min == 5) && 
  +                     (xt.tm_hour == 14) &&
  +                     (xt.tm_mday == 14) &&
  +                     (xt.tm_mon == 8) &&
  +                     (xt.tm_year == 102) &&
  +                     (xt.tm_wday == 6) &&
  +                     (xt.tm_yday == 256));
   }
   
   static void test_strftimeoffset(CuTest *tc)
  @@ -279,7 +287,6 @@
           CuNotImpl(tc, "apr_strftime");
       }
       CuAssertTrue(tc, rv == APR_SUCCESS);
  -    CuAssertStrEquals(tc, "14:05:36", str);
   }
   
   CuSuite *testtime(void)
  
  
  

Mime
View raw message