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 testfile.c
Date Wed, 11 Dec 2002 20:38:01 GMT
rbb         2002/12/11 12:38:01

  Modified:    test     testfile.c
  Log:
  Make the file tests more portable.  The status checking needs to use our
  macros, not the values directly.
  
  Revision  Changes    Path
  1.59      +3 -3      apr/test/testfile.c
  
  Index: testfile.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testfile.c,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- testfile.c	27 Nov 2002 11:54:50 -0000	1.58
  +++ testfile.c	11 Dec 2002 20:38:01 -0000	1.59
  @@ -79,7 +79,7 @@
                          APR_CREATE | APR_EXCL, 
                          APR_UREAD | APR_UWRITE | APR_GREAD, p);
       CuAssertTrue(tc, rv != APR_SUCCESS);
  -    CuAssertIntEquals(tc, APR_EACCES, rv);
  +    CuAssertIntEquals(tc, 1, APR_STATUS_IS_EACCES(rv));
   #if 0
       /* I consider this a bug, if we are going to return an error, we shouldn't
        * allocate the file pointer.  But, this would make us fail the text, so
  @@ -151,7 +151,7 @@
       CuAssertIntEquals(tc, rv, APR_SUCCESS);
       /* We just closed the file, so this should fail */
       rv = apr_file_read(filetest, &str, &one);
  -    CuAssertIntEquals(tc, APR_EBADF, rv);
  +    CuAssertIntEquals(tc, 1, APR_STATUS_IS_EBADF(rv));
   }
   
   static void test_file_remove(CuTest *tc)
  @@ -174,7 +174,7 @@
       rv = apr_file_open(&filetest, FILENAME, 
                          APR_WRITE, 
                          APR_UREAD | APR_UWRITE | APR_GREAD, p);
  -    CuAssertIntEquals(tc, APR_ENOENT, rv);
  +    CuAssertIntEquals(tc, 1, APR_STATUS_IS_ENOENT(rv));
   }
   
   static void test_open_writecreate(CuTest *tc)
  
  
  

Mime
View raw message