IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 2, 2004, 10:02:42 AM (22 years ago)
Author:
desonia
Message:

Adjusted tests to the new behavior of psFree/psMemDecrRefCounter.

File:
1 edited

Legend:

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

    r722 r829  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-05-19 00:09:25 $
     8 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-06-02 20:02:42 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    102102    int currentId = psMemGetId();
    103103    int ref = 0;
    104     psMemProblemCallback cb;
    105104
    106105    psLogMsg(__func__,PS_LOG_INFO,"memory reference count shall be incrementable/decrementable");
     
    133132    }
    134133
    135     psLogMsg(__func__,PS_LOG_INFO,"expect error from free as multiple referenced buffer is freed.");
    136 
    137     problemCallbackCalled = 0;
    138     cb = psMemProblemCallbackSet(memProblemCallback);
     134    psLogMsg(__func__,PS_LOG_INFO,"psFree shall be just decrement a multiple refererenced pointer.");
    139135
    140136    psFree(mem);
    141137
    142     psMemProblemCallbackSet(cb);
    143 
    144     if (problemCallbackCalled != 1) {
    145         psError(__func__,"Expected memProblemCallback to be called once, but was called %d times.",
    146                 problemCallbackCalled);
     138    ref = psMemGetRefCounter(mem);
     139    if (ref != 1) {
     140        psError(__func__,"Expected to find buffer reference count to be 1, but it was %d.",ref);
    147141        return 1;
    148142    }
Note: See TracChangeset for help on using the changeset viewer.