IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 18, 2005, 3:44:48 PM (21 years ago)
Author:
drobbin
Message:

psModules now works with the reorganized version of psLib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/test/tst_pmObjects01.c

    r4221 r4579  
    1919 * abd never deallocate, no error is generated.
    2020 *
    21  *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    22  *  @date $Date: 2005-06-13 19:59:21 $
     21 *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     22 *  @date $Date: 2005-07-19 01:44:48 $
    2323 *
    2424 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    128128    } else {
    129129        if ((tmpModel->params->n != 7) || (tmpModel->dparams->n != 7)) {
    130             printf("TEST ERROR: pmModelAlloc(PS_MODEL_GAUSS) allocated an incorrect number of params (%d, %d)\n",
     130            printf("TEST ERROR: pmModelAlloc(PS_MODEL_GAUSS) allocated an incorrect number of params (%ld, %ld)\n",
    131131                   tmpModel->params->n, tmpModel->dparams->n);
    132132            testStatus = false;
     
    150150    } else {
    151151        if ((tmpModel->params->n != 7) || (tmpModel->dparams->n != 7)) {
    152             printf("TEST ERROR: pmModelAlloc(PS_MODEL_PGAUSS) allocated an incorrect number of params (%d, %d)\n",
     152            printf("TEST ERROR: pmModelAlloc(PS_MODEL_PGAUSS) allocated an incorrect number of params (%ld, %ld)\n",
    153153                   tmpModel->params->n, tmpModel->dparams->n);
    154154            testStatus = false;
     
    172172    } else {
    173173        if ((tmpModel->params->n != 11) || (tmpModel->dparams->n != 11)) {
    174             printf("TEST ERROR: pmModelAlloc(PS_MODEL_TWIST_GAUSS) allocated an incorrect number of params (%d, %d)\n",
     174            printf("TEST ERROR: pmModelAlloc(PS_MODEL_TWIST_GAUSS) allocated an incorrect number of params (%ld, %ld)\n",
    175175                   tmpModel->params->n, tmpModel->dparams->n);
    176176            testStatus = false;
     
    194194    } else {
    195195        if ((tmpModel->params->n != 9) || (tmpModel->dparams->n != 9)) {
    196             printf("TEST ERROR: pmModelAlloc(PS_MODEL_WAUSS) allocated an incorrect number of params (%d, %d)\n",
     196            printf("TEST ERROR: pmModelAlloc(PS_MODEL_WAUSS) allocated an incorrect number of params (%ld, %ld)\n",
    197197                   tmpModel->params->n, tmpModel->dparams->n);
    198198            testStatus = false;
     
    216216    } else {
    217217        if ((tmpModel->params->n != 8) || (tmpModel->dparams->n != 8)) {
    218             printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC) allocated an incorrect number of params (%d, %d)\n",
     218            printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC) allocated an incorrect number of params (%ld, %ld)\n",
    219219                   tmpModel->params->n, tmpModel->dparams->n);
    220220            testStatus = false;
     
    238238    } else {
    239239        if ((tmpModel->params->n != 12) || (tmpModel->dparams->n != 12)) {
    240             printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC_CORE) allocated an incorrect number of params (%d, %d)\n",
     240            printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC_CORE) allocated an incorrect number of params (%ld, %ld)\n",
    241241                   tmpModel->params->n, tmpModel->dparams->n);
    242242            testStatus = false;
     
    290290    } else {
    291291        if (outData->n != 1) {
    292             printf("TEST ERROR: outData->n is %d\n", outData->n);
     292            printf("TEST ERROR: outData->n is %ld\n", outData->n);
    293293            testStatus = false;
    294294        }
     
    316316
    317317        if (outData->n != 0) {
    318             printf("TEST ERROR: outData->n is %d\n", outData->n);
     318            printf("TEST ERROR: outData->n is %ld\n", outData->n);
    319319            testStatus = false;
    320320        }
     
    344344
    345345        if (outData->n != 1) {
    346             printf("TEST ERROR: outData->n is %d\n", outData->n);
     346            printf("TEST ERROR: outData->n is %ld\n", outData->n);
    347347            testStatus = false;
    348348        }
     
    370370
    371371        if (outData->n != 0) {
    372             printf("TEST ERROR: outData->n is %d\n", outData->n);
     372            printf("TEST ERROR: outData->n is %ld\n", outData->n);
    373373            testStatus = false;
    374374        }
     
    398398
    399399        if (outData->n != n/2) {
    400             printf("TEST ERROR: outData->n is %d\n", outData->n);
     400            printf("TEST ERROR: outData->n is %ld\n", outData->n);
    401401            testStatus = false;
    402402        }
     
    423423
    424424        if (outData->n != 0) {
    425             printf("TEST ERROR: outData->n is %d\n", outData->n);
     425            printf("TEST ERROR: outData->n is %ld\n", outData->n);
    426426            testStatus = false;
    427427        }
     
    477477
    478478/******************************************************************************
    479 test02(): 
     479test02():
    480480// XXX: Must test flat peaks.
    481481// XXX: test 1-by-n and n-by-1 images.
     
    539539        }
    540540        if (outData->n != expectedNumPeaks) {
    541             printf("TEST ERROR: pmFindImagePeaks found %d peaks (should be %d)\n", outData->n, expectedNumPeaks);
     541            printf("TEST ERROR: pmFindImagePeaks found %ld peaks (should be %d)\n", outData->n, expectedNumPeaks);
    542542            testStatus = false;
    543543        }
     
    681681    /* XXX: Modify for new pmCullPeaks
    682682        outData = pmCullPeaks(outData, PS_MAX_F32, NULL);
    683      
     683
    684684        if (outData == NULL) {
    685685            printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n");
     
    702702    printf("Calling pmCullPeaks with tiny maxValue and NULL psRegion.\n");
    703703    outData = pmFindImagePeaks(imgData, 0.0);
    704     printf("pmFindImagePeaks found %d peaks\n", outData->n);
     704    printf("pmFindImagePeaks found %ld peaks\n", outData->n);
    705705    /* XXX: Modify for new pmCullPeaks
    706706        outData = pmCullPeaks(outData, 0.0, NULL);
    707      
     707
    708708        if (outData == NULL) {
    709709            printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n");
     
    726726    printf("Calling pmCullPeaks with large maxValue and disjoint psRegion.\n");
    727727    outData = pmFindImagePeaks(imgData, 0.0);
    728     printf("pmFindImagePeaks found %d peaks\n", outData->n);
     728    printf("pmFindImagePeaks found %ld peaks\n", outData->n);
    729729    psRegion tmpRegion = psRegionSet(10000.0, 20000.0, 10000.0, 20000.0);
    730730
    731731    /* XXX: Modify for new pmCullPeaks
    732732        outData = pmCullPeaks(outData, PS_MAX_F32, tmpRegion);
    733      
     733
    734734        if (outData == NULL) {
    735735            printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n");
     
    752752    printf("Calling pmCullPeaks with large maxValue and non-disjoint psRegion.\n");
    753753    outData = pmFindImagePeaks(imgData, 0.0);
    754     printf("pmFindImagePeaks found %d peaks\n", outData->n);
     754    printf("pmFindImagePeaks found %ld peaks\n", outData->n);
    755755    tmpRegion = psRegionSet(-PS_MAX_F32, PS_MAX_F32, -PS_MAX_F32, PS_MAX_F32);
    756756    /* XXX: Modify for new pmCullPeaks
    757757        outData = pmCullPeaks(outData, PS_MAX_F32, tmpRegion);
    758      
     758
    759759        if (outData == NULL) {
    760760            printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n");
     
    11451145            testStatus = false;
    11461146        }
    1147      
     1147
    11481148        printf("----------------------------------------------------------------------------------\n");
    11491149        printf("Calling pmSourceSetPixelsCircle with subImage endCol > numCols.  Should generate error and return NULL.\n");
     
    11561156            testStatus = false;
    11571157        }
    1158      
     1158
    11591159        printf("----------------------------------------------------------------------------------\n");
    11601160        printf("Calling pmSourceSetPixelsCircle with subImage startRow < 0.  Should generate error and return NULL.\n");
     
    11671167            testStatus = false;
    11681168        }
    1169      
     1169
    11701170        printf("----------------------------------------------------------------------------------\n");
    11711171        printf("Calling pmSourceSetPixelsCircle with subImage endRow > numRows.  Should generate error and return NULL.\n");
Note: See TracChangeset for help on using the changeset viewer.