IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 5, 2005, 11:28:55 AM (20 years ago)
Author:
gusciora
Message:

Some code preparation for the release.

File:
1 edited

Legend:

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

    r5516 r5681  
    2020 * XXX: Memory leaks are not being caught.  If I allocated a psVector in these functions
    2121 * and never deallocate, no error is generated.
     22 *
     23 * XXX: Much of this file is commented out due to the API changes in rel 7.
     24 *
     25 *
    2226Fully Tested:
    2327    pmPeakAlloc()
     
    2731    most of psObjects.c is not tested
    2832 *
    29  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    30  *  @date $Date: 2005-11-15 20:09:03 $
     33 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     34 *  @date $Date: 2005-12-05 21:28:55 $
    3135 *
    3236 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5054//static int test07(void);
    5155//static int test08(void);
    52 static int test09(void);
    53 static int test15(void);
    54 static int test16(void);
    55 static int test20(void);
     56//static int test09(void);
     57//static int test15(void);
     58//static int test16(void);
     59//static int test20(void);
    5660testDescription tests[] = {
    5761                              {test00, 000, "pmObjects: structure allocators and deallocators", true, false},
     
    6468                              //                              {test07, 001, "pmObjects: pmMin()", true, false},
    6569                              //                              {test08, 001, "pmObjects: pmSourceModelGuess()", true, false},
    66                               {test09, 001, "pmObjects: pmSourceContour()", true, false},
    67                               {test15, 001, "pmObjects: pmSourceAddModel()", true, false},
    68                               {test16, 001, "pmObjects: pmSourceSubModel()", true, false},
    69                               {test20, 001, "pmObjects: pmSourceSubModel()", true, false},
     70                              //{test09, 001, "pmObjects: pmSourceContour()", true, false},
     71                              //{test15, 001, "pmObjects: pmSourceAddModel()", true, false},
     72                              //{test16, 001, "pmObjects: pmSourceSubModel()", true, false},
     73                              //{test20, 001, "pmObjects: pmSourceSubModel()", true, false},
    7074                              {NULL}
    7175                          };
     
    10631067XXX: We don't verify the numbers.
    10641068 *****************************************************************************/
     1069/*
    10651070int test15( void )
    10661071{
     
    10831088        testStatus = false;
    10841089    }
    1085 
    1086 
     1090 
     1091 
    10871092    tmpSource->modelPSF = pmModelAlloc(PS_MODEL_GAUSS);
    10881093    tmpSource->modelPSF->params->data.F32[0] = 5.0;
     
    10931098    tmpSource->modelPSF->params->data.F32[5] = 1.0;
    10941099    tmpSource->modelPSF->params->data.F32[6] = 2.0;
    1095 
     1100 
    10961101    printf("----------------------------------------------------------------------------------\n");
    10971102    printf("Calling pmSourceAddModel with NULL psImage.  Should generate error, return FALSE.\n");
     
    11011106        testStatus = false;
    11021107    }
    1103 
     1108 
    11041109    printf("----------------------------------------------------------------------------------\n");
    11051110    printf("Calling pmSourceAddModel with NULL psSrc.  Should generate error, return FALSE.\n");
     
    11091114        testStatus = false;
    11101115    }
    1111 
     1116 
    11121117    printf("----------------------------------------------------------------------------------\n");
    11131118    printf("Calling pmSourceAddModel with acceptable data.\n");
     
    11171122        testStatus = false;
    11181123    }
    1119 
     1124 
    11201125    psFree(tmpSource);
    11211126    psFree(imgData);
    11221127    return(testStatus);
    11231128}
     1129*/
    11241130
    11251131#define TST16_NUM_ROWS 100
     
    11341140XXX: We don't verify the numbers.
    11351141 *****************************************************************************/
     1142/*
    11361143int test16( void )
    11371144{
     
    11451152    pmSource *tmpSource = NULL;
    11461153    psBool rc = false;
    1147 
     1154 
    11481155    pmPeak *tmpPeak = pmPeakAlloc((psF32) (TST16_NUM_ROWS / 2),
    11491156                                  (psF32) (TST16_NUM_COLS / 2),
    11501157                                  200.0,
    11511158                                  PM_PEAK_LONE);
    1152 
     1159 
    11531160    printf("Calling pmSourceLocalSky with valid data.\n");
    11541161    tmpPeak->x = (psF32) (TST16_NUM_ROWS / 2);
     
    11591166                                 (psF32) TST16_INNER_RADIUS,
    11601167                                 (psF32) TST16_OUTER_RADIUS);
    1161 
     1168 
    11621169    if (tmpSource == NULL) {
    11631170        printf("TEST ERROR: pmSourceLocalSky() returned a NULL pmSource.\n");
    11641171        testStatus = false;
    11651172    }
    1166 
     1173 
    11671174    tmpSource->modelPSF = pmModelAlloc(PS_MODEL_GAUSS);
    11681175    tmpSource->modelPSF->params->data.F32[0] = 5.0;
     
    11731180    tmpSource->modelPSF->params->data.F32[5] = 1.0;
    11741181    tmpSource->modelPSF->params->data.F32[6] = 2.0;
    1175 
     1182 
    11761183    printf("----------------------------------------------------------------------------------\n");
    11771184    printf("Calling pmSourceSubModel with NULL psImage.  Should generate error, return FALSE.\n");
     
    11811188        testStatus = false;
    11821189    }
    1183 
     1190 
    11841191    printf("----------------------------------------------------------------------------------\n");
    11851192    printf("Calling pmSourceSubModel with NULL psSrc.  Should generate error, return FALSE.\n");
     
    11891196        testStatus = false;
    11901197    }
    1191 
     1198 
    11921199    printf("----------------------------------------------------------------------------------\n");
    11931200    printf("Calling pmSourceSubModel with acceptable data.\n");
     
    11971204        testStatus = false;
    11981205    }
    1199 
     1206 
    12001207    psFree(tmpSource);
    12011208    psFree(imgData);
    12021209    return(testStatus);
    12031210}
     1211*/
    12041212
    12051213#define TST20_NUM_ROWS 100
     
    12141222XXX: We don't verify the numbers.
    12151223 *****************************************************************************/
     1224/*
    12161225int test20( void )
    12171226{
     
    12251234    pmSource *tmpSource = NULL;
    12261235    psBool rc = false;
    1227 
     1236 
    12281237    pmPeak *tmpPeak = pmPeakAlloc((psF32) (TST20_NUM_ROWS / 2),
    12291238                                  (psF32) (TST20_NUM_COLS / 2),
    12301239                                  200.0,
    12311240                                  PM_PEAK_LONE);
    1232 
     1241 
    12331242    printf("Calling pmSourceLocalSky with valid data.\n");
    12341243    tmpPeak->x = (psF32) (TST20_NUM_ROWS / 2);
     
    12391248                                 (psF32) TST20_INNER_RADIUS,
    12401249                                 (psF32) TST20_OUTER_RADIUS);
    1241 
     1250 
    12421251    if (tmpSource == NULL) {
    12431252        printf("TEST ERROR: pmSourceLocalSky() returned a NULL pmSource.\n");
    12441253        testStatus = false;
    12451254    }
    1246 
     1255 
    12471256    tmpSource->modelPSF = pmModelAlloc(PS_MODEL_GAUSS);
    1248 
    1249 
     1257 
     1258 
    12501259    tmpSource->modelPSF->params->data.F32[0] = 5.0;
    12511260    tmpSource->modelPSF->params->data.F32[1] = 70.0;
     
    12551264    tmpSource->modelPSF->params->data.F32[5] = 1.0;
    12561265    tmpSource->modelPSF->params->data.F32[6] = 2.0;
    1257 
     1266 
    12581267    printf("----------------------------------------------------------------------------------\n");
    12591268    printf("Calling pmSourceFitModel with NULL psImage.  Should generate error, return FALSE.\n");
     
    12631272        testStatus = false;
    12641273    }
    1265 
     1274 
    12661275    printf("----------------------------------------------------------------------------------\n");
    12671276    printf("Calling pmSourceFitModel with NULL pmSource.  Should generate error, return FALSE.\n");
     
    12711280        testStatus = false;
    12721281    }
    1273 
     1282 
    12741283    printf("----------------------------------------------------------------------------------\n");
    12751284    printf("Calling pmSourceFitModel with acceptable data.\n");
    12761285    rc = pmSourceFitModel(tmpSource, imgData);
    12771286    printf("pmSourceFitModel returned %d\n", rc);
    1278 
     1287 
    12791288    // XXX: Memory leaks are not being tested
    12801289    psVector *junk = psVectorAlloc(10, PS_TYPE_F32);
    12811290    junk->data.F32[0] = 0.0;
    1282 
     1291 
    12831292    psFree(tmpSource);
    12841293    psFree(imgData);
    12851294    return(testStatus);
    12861295}
    1287 
    1288 
     1296*/
     1297
Note: See TracChangeset for help on using the changeset viewer.