apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/test testfileinfo.c
Date Fri, 07 Feb 2003 12:33:00 GMT
jorton      2003/02/07 04:33:00

  Modified:    test     testfileinfo.c
  Log:
  test_buffered_write_size: Pass TRUNCATE not EXCL to open so test isn't
  guaranteed to fail if run more than once.  Use apr_assert_success for
  better failure messages.
  
  Revision  Changes    Path
  1.10      +4 -4      apr/test/testfileinfo.c
  
  Index: testfileinfo.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testfileinfo.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- testfileinfo.c	3 Feb 2003 23:51:56 -0000	1.9
  +++ testfileinfo.c	7 Feb 2003 12:33:00 -0000	1.10
  @@ -218,10 +218,10 @@
       apr_size_t bytes;
   
       rv = apr_file_open(&thefile, NEWFILENAME,
  -                       APR_READ | APR_WRITE | APR_CREATE | APR_EXCL
  +                       APR_READ | APR_WRITE | APR_CREATE | APR_TRUNCATE
                          | APR_BUFFERED | APR_DELONCLOSE,
                          APR_OS_DEFAULT, p);
  -    CuAssertIntEquals(tc, APR_SUCCESS, rv);
  +    apr_assert_success(tc, "open file", rv);
   
       /* A funny thing happened to me the other day: I wrote something
        * into a buffered file, then asked for its size using
  @@ -230,11 +230,11 @@
        */
       bytes = data_len;
       rv = apr_file_write(thefile, NEWFILEDATA, &bytes);
  -    CuAssertIntEquals(tc, APR_SUCCESS, rv);
  +    apr_assert_success(tc, "write file contents", rv);
       CuAssertTrue(tc, data_len == bytes);
   
       rv = apr_file_info_get(&finfo, APR_FINFO_SIZE, thefile);
  -    CuAssertIntEquals(tc, APR_SUCCESS, rv);
  +    apr_assert_success(tc, "get file size", rv);
       CuAssertTrue(tc, bytes == (apr_size_t) finfo.size);
       apr_file_close(thefile);
   }
  
  
  

Mime
View raw message