IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 1, 2004, 12:30:43 PM (22 years ago)
Author:
gusciora
Message:

...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/dataManip/tst_psMinimize01.c

    r1123 r1177  
    6767    int i = 0;
    6868    psVector *theParams = NULL;
     69    int currentId = psMemGetId();
     70    int testStatus = true;
     71    int memLeaks = 0;
    6972
    7073    domain = psImageAlloc(DATA_WIDTH, NUM_DATA, PS_TYPE_F32);
     
    127130    data->data.F32[39] = 1.061982;
    128131
     132    printPositiveTestHeader(stdout,
     133                            "psMinimize functions",
     134                            "psMinimizeChi2(): no masks");
     135
    129136    theParams = psMinimizeChi2(myFunc,
    130137                               myFuncDeriv,
     
    139146        printf("theParams[%d] is %.1f\n", i, theParams->data.F32[i]);
    140147    }
     148    printf("chiSq is %f\n", chiSq);
    141149
    142     printf("chiSq is %f\n", chiSq);
     150    psMemCheckCorruption(1);
     151    printFooter(stdout,
     152                "psMinimize functions",
     153                "psMinimizeChi2(): no masks",
     154                testStatus);
     155    psMemCheckCorruption(1);
     156    psFree(domain);
     157    psFree(data);
     158    psFree(errors);
     159    psFree(initialGuess);
     160    psFree(paramMask);
     161    psFree(tmpVecPtr);
     162
     163    psMemCheckCorruption(1);
     164    memLeaks = psMemCheckLeaks(currentId,NULL,NULL);
     165    if (0 != memLeaks) {
     166        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
     167    }
     168
     169    return (!testStatus);
    143170}
Note: See TracChangeset for help on using the changeset viewer.