IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 13, 2004, 10:49:56 AM (22 years ago)
Author:
desonia
Message:

fixed errors caused indirectly from the psList change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/sysUtils/tst_psMemory.c

    r2561 r2703  
    66*  @author Robert DeSonia, MHPCC
    77*
    8 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2004-12-01 00:55:34 $
     8*  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2004-12-13 20:49:56 $
    1010*
    1111*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4646
    4747testDescription tests[] = {
    48                               {
    49                                   TPCheckBufferPositive, 449, "checkBufferPositive", 0, false
    50                               },
    51                               {
    52                                   TPOutOfMemory, 450, "outOfMemory", -6, false
    53                               },
    54                               {
    55                                   TPReallocOutOfMemory, 562, "reallocOutOfMemory", -6, false
    56                               },
    57                               {
    58                                   TPrealloc, 451, "psRealloc", 0, false
    59                               },
    60                               {
    61                                   TPallocCallback, 452, "allocCallback", 0, false
    62                               },
    63                               {
    64                                   TPallocCallback, 453, "allocCallback2", 0, true
    65                               },
    66                               {
    67                                   TPcheckLeaks, 454, "checkLeaks", 0, false
    68                               },
    69                               {
    70                                   TPmemCorruption, 455, "psMemCorruption", 0, false
    71                               },
    72                               {
    73                                   TPFreeReferencedMemory, 456, "freeReferencedMemory", 0, false
    74                               },
    75                               {
    76                                   TPmultipleFree, 699, "multipleFree", 0, false
    77                               },
    78                               {
    79                                   NULL
    80                               }
     48                              {TPCheckBufferPositive, 449, "checkBufferPositive", 0, false},
     49                              {TPOutOfMemory, 450, "outOfMemory", -6, false},
     50                              {TPReallocOutOfMemory, 562, "reallocOutOfMemory", -6, false},
     51                              {TPrealloc, 451, "psRealloc", 0, false},
     52                              {TPallocCallback, 452, "allocCallback", 0, false},
     53                              {TPallocCallback, 453, "allocCallback2", 0, true},
     54                              {TPcheckLeaks, 454, "checkLeaks", 0, false},
     55                              {TPmemCorruption, 455, "psMemCorruption", 0, false},
     56                              {TPFreeReferencedMemory, 456, "freeReferencedMemory", 0, false},
     57                              {TPmultipleFree, 699, "multipleFree", -6, false},
     58                              {NULL}
    8159                          };
    8260
    83 psS32 main( psS32 argc, char* argv[] )
     61psS32 main(psS32 argc, char* argv[])
    8462{
    8563    psLogSetLevel( PS_LOG_INFO );
     
    550528    psFree( buffer );
    551529
    552     psLogMsg( __func__, PS_LOG_INFO, "Next should be an error about multiple freeing." );
     530    psLogMsg( __func__, PS_LOG_INFO, "Next should abort due to multiple freeing." );
    553531    psFree( buffer );
    554532
    555     psErr* err = (psErr*)psErrorLast();
    556 
    557     if (err->code != PS_ERR_MEMORY_DEREF_USAGE) {
    558         psError(PS_ERR_UNKNOWN,true,
    559                 "Multiple psFree calls generated wrong error code (%d)",
    560                 err->code);
    561         psFree(err);
    562         return 1;
    563     }
    564 
    565     psFree(err);
    566 
    567     return 0;
    568 }
     533    psError(PS_ERR_UNKNOWN,true,
     534            "Multiple psFree call survived");
     535
     536    return 0;
     537}
Note: See TracChangeset for help on using the changeset viewer.