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/image/tst_psImage.c

    r949 r953  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-06-09 20:34:34 $
     8 *  @version $Revision: 1.15 $ $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
     
    4848int testImageAlloc(void)
    4949{
    50     int currentId = psMemGetId();
    5150    psImage* image = NULL;
    5251    unsigned int sizes = 6;
     
    224223            // children is freed.
    225224            psImageFree(image);
    226             if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    227                 psError(__func__,"Memory Leaks Detected");
    228                 return 64;
    229             }
    230             psMemCheckCorruption(1);
    231 
    232225        }
    233226    }
     
    235228    // #548: Verify program execution doesn't stop, if the input psImage structure pointer is null.
    236229    psImageFree(NULL);
    237     if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    238         psError(__func__,"Memory Leaks Detected");
    239         return 64;
    240     }
    241     psMemCheckCorruption(1);
    242230
    243231    // #548: Verify no memory leaks or corruption are detected after a valid psImage structure with multiple
     
    249237    psImageFree(image);
    250238
    251     if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    252         psError(__func__,"Memory Leaks Detected");
    253         return 64;
    254     }
    255     psMemCheckCorruption(1);
    256 
    257239    return 0;
    258240}
     
    261243int testImageSubset(void)
    262244{
    263     int currentId = psMemGetId();
    264245    psImage preSubsetStruct;
    265246    psImage* original;
     
    519500    psImageFree(original);
    520501
    521     // Verify no memory leaks or corruption are detected for a psImage structure
    522     // Verify no memory leaks or corruption are detected for a psImage structure
    523     if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    524         psError(__func__,"Memory Leaks Detected");
    525         return 64;
    526     }
    527     psMemCheckCorruption(1);
    528 
    529502    return 0;
    530503}
     
    537510    unsigned int c = 128;
    538511    unsigned int r = 256;
    539     int currentId = psMemGetId();
    540512
    541513    img = psImageAlloc(c,r,PS_TYPE_F32);
     
    627599    psImageFree(img2);
    628600
    629     if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    630         psAbort(__func__,"Memory Leaks!");
    631     }
    632     psMemCheckCorruption(1);
    633 
    634601    return 0;
    635602}
     
    642609    psF32 min;
    643610    psF32 max;
    644     int currentId = psMemGetId();
    645611    int numClipped = 0;
    646612    int retVal;
     
    740706    }
    741707
    742     if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    743         psAbort(__func__,"Memory Leaks!");
    744     }
    745     psMemCheckCorruption(1);
    746 
    747708    return 0;
    748709}
     
    753714    unsigned int c = 128;
    754715    unsigned int r = 256;
    755     int currentId = psMemGetId();
    756716    int numClipped = 0;
    757717    int retVal;
     
    825785    }
    826786
    827 
    828     if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    829         psAbort(__func__,"Memory Leaks!");
    830     }
    831     psMemCheckCorruption(1);
    832 
    833787    return 0;
    834788}
Note: See TracChangeset for help on using the changeset viewer.