rbb         2002/12/29 12:55:22

  Modified:    test     testfile.c
  Log:
  Remove some code that we can never reach.  If we fail the
  CuAssertPtrEquals, the test suite will longjmp.  If we pass it, then the
  pointer is NULL, and we won't go to the internals of the if statement.
  
  Revision  Changes    Path
  1.65      +1 -12     apr/test/testfile.c
  
  Index: testfile.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testfile.c,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- testfile.c        29 Dec 2002 19:51:34 -0000      1.64
  +++ testfile.c        29 Dec 2002 20:55:22 -0000      1.65
  @@ -81,9 +81,6 @@
       CuAssertTrue(tc, rv != APR_SUCCESS);
       CuAssertIntEquals(tc, 1, APR_STATUS_IS_EACCES(rv));
       CuAssertPtrEquals(tc, NULL, thefile); 
  -    if (thefile) {
  -        apr_file_close(thefile);
  -    }
   }
   
   static void test_open_dir_read(CuTest *tc)
  @@ -97,9 +94,6 @@
       CuAssertTrue(tc, rv != APR_SUCCESS);
       CuAssertIntEquals(tc, 1, APR_STATUS_IS_EACCES(rv));
       CuAssertPtrEquals(tc, NULL, thedir);
  -    if (thedir) {
  -        apr_file_close(thedir);
  -    }
   }
   
   static void test_open_excl(CuTest *tc)
  @@ -113,9 +107,6 @@
       CuAssertTrue(tc, rv != APR_SUCCESS);
       CuAssertIntEquals(tc, 1, APR_STATUS_IS_EEXIST(rv));
       CuAssertPtrEquals(tc, NULL, thefile); 
  -    if (thefile) {
  -        apr_file_close(thefile);
  -    }
   }
   
   static void test_open_read(CuTest *tc)
  @@ -209,9 +200,7 @@
                          APR_WRITE, 
                          APR_UREAD | APR_UWRITE | APR_GREAD, p);
       CuAssertIntEquals(tc, 1, APR_STATUS_IS_ENOENT(rv));
  -    if (filetest) {
  -        apr_file_close(filetest);
  -    }
  +    CuAssertPtrEquals(tc, NULL, filetest);
   }
   
   static void test_open_writecreate(CuTest *tc)
  
  
  

Reply via email to