IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 9, 2004, 11:20:53 AM (22 years ago)
Author:
desonia
Message:

moved memory leak check into runTest (../psTest.c).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/collections/tst_psList.c

    r950 r953  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-06-09 20:56:23 $
     8 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-06-09 21:20:53 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4747int testListAlloc(void)
    4848{
    49     int currentId = psMemGetId();
    5049    psList* list;
    5150    int ref;
     
    108107    psListFree(list,PS_FREE);
    109108
    110     if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    111         psError(__func__,"Memory Leaks Detected");
    112         return 64;
    113     }
    114     psMemCheckCorruption(1);
    115 
    116109    return 0;
    117110}
     
    119112int testListAdd(void)
    120113{
    121     int currentId = psMemGetId();
    122114    psList* list = NULL;
    123115    int* data = NULL;
     
    289281
    290282    psListFree(list, PS_FREE);
    291 
    292     if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    293         psError(__func__,"Memory Leaks Detected");
    294         return 64;
    295     }
    296     psMemCheckCorruption(1);
    297283
    298284    return 0;
     
    323309int testListGet(void)
    324310{
    325     int currentId = psMemGetId();
    326311    psList* list = NULL;
    327312    int* data;
     
    418403    psListFree(list,PS_FREE);
    419404
    420     if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    421         psError(__func__,"Memory Leaks Detected");
    422         return 64;
    423     }
    424     psMemCheckCorruption(1);
    425 
    426405    return 0;
    427406}
     
    429408int testListRemove(void)
    430409{
    431     int currentId = psMemGetId();
    432410    psList* list = NULL;
    433411    int* data;
     
    658636    psListFree(list,PS_FREE);
    659637
    660     if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    661         psError(__func__,"Memory Leaks Detected");
    662         return 64;
    663     }
    664     psMemCheckCorruption(1);
    665 
    666638    return 0;
    667639
     
    671643{
    672644
    673     int currentId = psMemGetId();
    674645    psList* list = NULL;
    675646    psVector* vec = NULL;
     
    720691    psListFree(list,PS_FREE);
    721692
    722     if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    723         psError(__func__,"Memory Leaks Detected");
    724         return 64;
    725     }
    726     psMemCheckCorruption(1);
    727 
    728693    // test vector -> dlist
    729694
     
    800765    psListFree(list,PS_FREE);
    801766
    802     if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    803         psError(__func__,"Memory Leaks Detected");
    804         return 64;
    805     }
    806     psMemCheckCorruption(1);
    807 
    808767    return 0;
    809768}
     
    811770int testListIterator(void)
    812771{
    813     int currentId = psMemGetId();
    814772    psList* list = NULL;
    815773    int* data;
     
    936894    psListFree(list,PS_FREE);
    937895
    938     if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    939         psError(__func__,"Memory Leaks Detected");
    940         return 64;
    941     }
    942     psMemCheckCorruption(1);
    943 
    944896    return 0;
    945897}
     898
     899int testListFree(void)
     900{
     901
     902    /*
     903    Call psDlistAlloc to create a doubly linked list. Create several data items and add them to the list.
     904    Verify    items are within the list. Verify the data item's reference counter are incremented after adding
     905    to    the list.    Call psDlistFree with NULL specified as the elemFree function. Verify the list is
     906    deallocated but    not the data    items. Verify the data item's reference counters are decremented by one
     907    compared to when added    to the list.
     908    */
     909
     910    return 0;
     911}
Note: See TracChangeset for help on using the changeset viewer.