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 testmmap.c
Date Thu, 14 Nov 2002 10:24:52 GMT
jorton      2002/11/14 02:24:52

  Modified:    test     testmmap.c
  Log:
  Fail gracefully if the apr_mmap_create call fails.
  
  Revision  Changes    Path
  1.34      +4 -0      apr/test/testmmap.c
  
  Index: testmmap.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testmmap.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- testmmap.c	13 Oct 2002 05:28:15 -0000	1.33
  +++ testmmap.c	14 Nov 2002 10:24:52 -0000	1.34
  @@ -120,6 +120,7 @@
   
   static void test_mmap_contents(CuTest *tc)
   {
  +    CuAssertPtrNotNull(tc, themmap);
       CuAssertPtrNotNull(tc, themmap->mm);
       CuAssertIntEquals(tc, themmap->size, 28);
       CuAssertStrEquals(tc, themmap->mm, "This is the MMAP data file.\n");
  @@ -128,6 +129,8 @@
   static void test_mmap_delete(CuTest *tc)
   {
       apr_status_t rv;
  +
  +    CuAssertPtrNotNull(tc, themmap);
       rv = apr_mmap_delete(themmap);
       CuAssertIntEquals(tc, rv, APR_SUCCESS);
   }
  @@ -137,6 +140,7 @@
       apr_status_t rv;
       void *addr;
   
  +    CuAssertPtrNotNull(tc, themmap);
       rv = apr_mmap_offset(&addr, themmap, 5);
       CuAssertStrEquals(tc, addr, "This is the MMAP data file.\n" + 5);
   }
  
  
  

Mime
View raw message