IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5856


Ignore:
Timestamp:
Dec 27, 2005, 4:05:18 PM (21 years ago)
Author:
magnier
Message:

updated tests from HEAD

Location:
branches/eam_rel9_b1/psModules/test
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_rel9_b1/psModules/test/astrom/tst_pmAstrometry01.c

    r5681 r5856  
    55*  @author GLG, MHPCC
    66*
    7 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    8 *  @date $Date: 2005-12-05 21:28:55 $
     7*  @version $Revision: 1.2.6.1 $ $Name: not supported by cvs2svn $
     8*  @date $Date: 2005-12-28 02:05:18 $
    99*
    1010* XXX: Add tests were the coordinate does not transform to any legitimate cell
     
    1212*
    1313* XXX: For each function, add tests for bad input parameters, as well as failed transforms.
     14*
     15* XXX: Must test pmFPASelectChip() and pmFPAExcludeChip().
    1416*
    1517*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2325static psS32 test3( void );
    2426static psS32 test4( void );
     27static psS32 test5( void );
    2528
    2629testDescription tests[] = {
    2730                              {test3, -3, "pmAstrometry focal plane transformations", 0, false},
    2831                              {test4, -3, "pmCheckParents()", 0, false},
     32                              {test5, -3, "pmFPASelectChip() and pmFPAExcludeChip()", 0, false},
    2933                              {NULL}
    3034                          };
     
    584588    return(testStatus);
    585589}
     590
     591/******************************************************************************
     592test5(): This routine wil test the pmFPASelectChip() and pmFPAExcludeChip()
     593functions.  We generate an pmFPA hierarchy, then set the ->valid members with
     594those routines, then verify.
     595 *****************************************************************************/
     596psS32 test5( void )
     597{
     598    psS32 testStatus = 0;
     599    pmChip *tmpChip = NULL;
     600
     601    //
     602    // Generate a pmFPA hierarchy.
     603    //
     604    pmFPA *tmpFPA = genSystem();
     605
     606    //
     607    // We test the ->valid member for each chip.
     608    //
     609    for (psS32 i = 0 ; i < tmpFPA->chips->n ; i++) {
     610        tmpChip = (pmChip *) tmpFPA->chips->data[i];
     611        if ((tmpChip == NULL) || (tmpChip->valid != false)) {
     612            printf("TEST ERROR: Could not properly generate an FPA hierarchy.\n");
     613            testStatus = 1;
     614        }
     615    }
     616
     617    //
     618    // Exclude chip number 0, include all others, then test return value
     619    //
     620    psS32 numChips = pmFPAExcludeChip(tmpFPA, 0);
     621    if (numChips != (NUM_CHIPS-1)) {
     622        printf("TEST ERROR: pmFPAExcludeChip() did not return the correct number of chips.\n");
     623        testStatus = 2;
     624    }
     625
     626    //
     627    // We test the ->valid member for each chip.
     628    //
     629    tmpChip = (pmChip *) tmpFPA->chips->data[0];
     630    if (tmpChip->valid != false) {
     631        printf("TEST ERROR: pmFPAExcludeChip() did not set the proper chip->valid to FALSE.\n");
     632        testStatus = 3;
     633    }
     634    for (psS32 i = 1 ; i < tmpFPA->chips->n ; i++) {
     635        pmChip *tmpChip = (pmChip *) tmpFPA->chips->data[i];
     636        if (tmpChip->valid != true) {
     637            printf("TEST ERROR: pmFPAExcludeChip() did not set the proper chip->valids to FALSE.\n");
     638            testStatus = 4;
     639        }
     640    }
     641
     642
     643    //
     644    // Include chip number 0, exclude all others, then test return value
     645    //
     646    psBool tmpBool = pmFPASelectChip(tmpFPA, 0);
     647    if (tmpBool != true) {
     648        printf("TEST ERROR: pmFPASelectChip() returned FALSE.\n");
     649        testStatus = 5;
     650    }
     651
     652    //
     653    // We test the ->valid member for each chip.
     654    //
     655    tmpChip = (pmChip *) tmpFPA->chips->data[0];
     656    if (tmpChip->valid != true) {
     657        printf("TEST ERROR: pmFPASelectChip() did not set the proper chip->valid to FALSE.\n");
     658        testStatus = 6;
     659    }
     660    for (psS32 i = 1 ; i < tmpFPA->chips->n ; i++) {
     661        pmChip *tmpChip = (pmChip *) tmpFPA->chips->data[i];
     662        if (tmpChip->valid != false) {
     663            printf("TEST ERROR: pmFPASelectChip() did not set the proper chip->valids to FALSE.\n");
     664            testStatus = 7;
     665        }
     666    }
     667
     668    psFree(tmpFPA);
     669    return(testStatus);
     670}
  • branches/eam_rel9_b1/psModules/test/imsubtract/tst_pmSubtractBias.c

    r5587 r5856  
    1919 *  test03: Calculate a row overscan vector and subtract it from each
    2020 *  row in the input image.
    21  * test05: 
     21 * test05:
    2222 *
    2323 *  @author GLG, MHPCC
     
    2525 *  XXX: Memory leaks are not being detected.
    2626 *
    27  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    28  *  @date $Date: 2005-11-23 23:54:30 $
     27 *  @version $Revision: 1.5.6.1 $ $Name: not supported by cvs2svn $
     28 *  @date $Date: 2005-12-28 02:05:18 $
    2929 *
    3030 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    326326        rc = pmSubtractBias(myReadout, NULL, NULL, PM_OVERSCAN_NONE, stat,
    327327                            0, PM_FIT_NONE, myBias);
    328     
     328 
    329329        for (i=0;i<numRows;i++) {
    330330            for (j=0;j<numCols;j++) {
     
    335335                    testStatus = 1;
    336336                }
    337     
     337 
    338338                // Restore myReadout for next test.
    339339                myReadout->image->data.F32[i][j] = (float) (i + j);
     
    627627    // Set overscan axis in the metadata.
    628628    //
    629     psBool rc;
     629    psBool rc = false;
    630630    if (overscanaxis == PM_OVERSCAN_ROWS) {
    631631        rc = psMetadataAddS32(myReadout->parent->concepts, PS_LIST_HEAD, "CELL.READDIR", 0, NULL, 1);
  • branches/eam_rel9_b1/psModules/test/objects/verified/tst_pmObjects01.stdout

    r5258 r5856  
    11Testing pmPeakAlloc()...
    22Testing pmMomentsAlloc()...
    3 Testing pmModelAlloc(PS_MODEL_GAUSS)...
    4 Testing pmModelAlloc(PS_MODEL_GAUSS)...
    5 Testing pmModelAlloc(PS_MODEL_GAUSS)...
    6 Testing pmModelAlloc(PS_MODEL_GAUSS)...
    73----------------------------------------------------------------------------------
    84Calling pmFindVectorPeaks with NULL psVector.  Should generate error and return NULL.
Note: See TracChangeset for help on using the changeset viewer.