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 testfile.c
Date Tue, 29 Apr 2003 20:32:06 GMT
jorton      2003/04/29 13:32:06

  Modified:    test     testfile.c
  Log:
  Fail gracefully rather than SEGV if data/file_datafile.txt can't be opened.
  
  Revision  Changes    Path
  1.68      +4 -1      apr/test/testfile.c
  
  Index: testfile.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testfile.c,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -u -r1.67 -r1.68
  --- testfile.c	2 Jan 2003 14:05:42 -0000	1.67
  +++ testfile.c	29 Apr 2003 20:32:06 -0000	1.68
  @@ -120,6 +120,7 @@
                          APR_READ, 
                          APR_UREAD | APR_UWRITE | APR_GREAD, p);
   
  +    apr_assert_success(tc, "Opening test file " FILENAME, rv);
       rv = apr_file_read(filetest, str, &nbytes);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
       CuAssertIntEquals(tc, strlen(TESTSTR), nbytes);
  @@ -137,6 +138,7 @@
       rv = apr_file_open(&filetest, FILENAME, 
                          APR_READ, 
                          APR_UREAD | APR_UWRITE | APR_GREAD, p);
  +    apr_assert_success(tc, "Opening test file " FILENAME, rv);
   
       rv = apr_file_name_get(&str, filetest);
       CuAssertIntEquals(tc, rv, APR_SUCCESS);
  @@ -155,7 +157,7 @@
       rv = apr_file_open(&filetest, FILENAME, 
                          APR_READ, 
                          APR_UREAD | APR_UWRITE | APR_GREAD, p);
  -
  +    apr_assert_success(tc, "Opening test file " FILENAME, rv);
   
       rv = apr_file_close(filetest);
       CuAssertIntEquals(tc, rv, APR_SUCCESS);
  @@ -247,6 +249,7 @@
       rv = apr_file_open(&filetest, FILENAME, 
                          APR_READ, 
                          APR_UREAD | APR_UWRITE | APR_GREAD, p);
  +    apr_assert_success(tc, "Open test file " FILENAME, rv);
   
       rv = apr_file_read(filetest, str, &nbytes);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
  
  
  

Mime
View raw message