IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 6, 2004, 9:36:33 AM (22 years ago)
Author:
evanalst
Message:

Add additional test case for test coverage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/image/tst_psImageFFT.c

    r1793 r1979  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-09-11 02:27:20 $
     8 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-06 19:36:30 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6868    unsigned int m = 128;
    6969    unsigned int n = 64;
     70    psImage* img4 = NULL;
     71    psImage* img5 = NULL;
    7072
    7173    /*
     
    128130    }
    129131
     132    /* Verify return null and program execution doesn't stop if input image is null */
     133    img4 = psImageFFT(NULL,NULL,PS_FFT_FORWARD);
     134    if (img4 != NULL ) {
     135        psError(__func__,"psImageFFT should return null for a null input image.");
     136        return 10;
     137    }
     138
     139    /* Verify return null and program execution doesn't stop if input image is invalid type */
     140    GENIMAGE(img4,8,8,S8,row+col);
     141    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error for invalid input image type.");
     142    img5 = psImageFFT(NULL,img4,PS_FFT_FORWARD);
     143    if (img5 != NULL) {
     144        psError(__func__,"psImageFFT should return null for an invalid type image.");
     145        return 11;
     146    }
     147    psFree(img4);
     148
     149    /* Verify return null and program execution doesn't stop if input image F32 but
     150       reverse FFT operation specified.
     151    */
     152    GENIMAGE(img4,8,8,F32,row+col);
     153    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error for F32 reverse FFT operation.");
     154    img5 = psImageFFT(NULL,img4,PS_FFT_REVERSE);
     155    if (img5 != NULL) {
     156        psError(__func__,"psImageFFT should return null for F32 input with reverse FFT operation.");
     157        return 12;
     158    }
     159    psFree(img4);
     160
     161    /* Verify return null and program execution doesn't stop if input image C32 but
     162       forward FFT operation specified.
     163    */
     164    GENIMAGE(img4,8,8,C32,row+col);
     165    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error for C32 forward FFT operation.");
     166    img5 = psImageFFT(NULL,img4,PS_FFT_FORWARD);
     167    if (img5 != NULL) {
     168        psError(__func__,"psImageFFT should return null for C32 input with forward FFT operation.");
     169        return 13;
     170    }
     171    psFree(img4);
     172
    130173    psFree(img);
    131174    psFree(img2);
Note: See TracChangeset for help on using the changeset viewer.