IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 22, 2005, 2:04:36 PM (21 years ago)
Author:
drobbin
Message:

Added and update PixelGet/Set, ImageGet/Set, and test fxns

Location:
trunk/psLib/test/mathtypes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/mathtypes/tst_psImage.c

    r5064 r5101  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-09-16 23:56:51 $
     8 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-09-23 00:04:36 $
    1010 *
    1111 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2626static psS32 testRegion3(void);
    2727static psS32 testImageInit(void);
     28static psS32 testImageGetSet(void);
    2829
    2930testDescription tests[] = {
     
    3536                              {testRegion3,793,"psRegionForSquare",0,false},
    3637                              {testImageInit,794,"psImageInit",0,false},
     38                              {testImageGetSet,795,"psImageInit",0,false},
    3739                              {NULL}
    3840                          };
     
    354356}
    355357
     358static psS32 testImageGetSet(void)
     359{
     360    psImage *image = NULL;
     361    image = psImageAlloc(5, 5, PS_TYPE_S32);
     362
     363    if ( !psImageSet(image, 0, 0, 10) )
     364        fprintf(stderr, "ImageSet failed to set S32 at position 0\n");
     365    if ( psImageSet(image, 10, 10, 100) )
     366        fprintf(stderr, "ImageSet Improperly set S32 at out of range position\n");
     367    if ( !psImageSet(image, -1, -1, 4) )
     368        fprintf(stderr, "ImageSet Failed to set S32 at position 4,4\n");
     369    if ( (psS32)psImageGet(image, 0, 0) != 10 )
     370        fprintf(stderr, "ImageGet Failed to return the correct S32 from position 0,0\n");
     371    if ( (psS32)psImageGet(image, -1, -1) != 4 )
     372        fprintf(stderr, "ImageGet Failed to return the correct S32 from tail using -1,-1\n");
     373
     374    psFree(image);
     375    return 0;
     376}
  • trunk/psLib/test/mathtypes/verified/tst_psImage.stderr

    r4887 r5101  
    132132---> TESTPOINT PASSED (psImage{psImageInit} | tst_psImage.c)
    133133
     134/***************************** TESTPOINT ******************************************\
     135*             TestFile: tst_psImage.c                                              *
     136*            TestPoint: psImage{psImageInit}                                       *
     137*             TestType: Positive                                                   *
     138\**********************************************************************************/
     139
     140
     141---> TESTPOINT PASSED (psImage{psImageInit} | tst_psImage.c)
     142
Note: See TracChangeset for help on using the changeset viewer.