IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 1, 2007, 6:20:06 PM (19 years ago)
Author:
gusciora
Message:

Added tabular file of all psLib functions in Chapter 6 of the SDRS (Data
Manipulation). Most of the test file changes in this check-in are fairly
cosmetic.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/math/tap_psMatrix01.c

    r10816 r13124  
    44*
    55*  This test driver contains the following tests:
    6 *     Create input images
    76*     Transpose input image into output image
    87*     Transpose input image into auto allocated NULL output image
    9 *     Free input images
    108*
    119*  @author  Ross Harman, MHPCC
    1210*
    13 *  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
    14 *  @date  $Date: 2006-12-20 20:02:29 $
     11*  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
     12*  @date  $Date: 2007-05-02 04:20:06 $
    1513*
    1614*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5452psS32 main( psS32 argc, char* argv[] )
    5553{
    56     plan_tests(10);
    57     // Preliminary: Create input images
     54    plan_tests(14);
     55
     56
     57    // Verify with NULL input params
     58    {
     59        psMemId id = psMemGetId();
     60        psImage *outImage = psMatrixTranspose(NULL, NULL);
     61        ok(outImage == NULL, "psMatrixTranspose() returned NULL with NULL input params");
     62        psFree(outImage);
     63        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     64    }
     65
     66
     67    // Verify with incorrect input image type
     68    {
     69        psMemId id = psMemGetId();
     70        psImage *inImage = (psImage*)psImageAlloc(3, 3, PS_TYPE_S64);
     71        psImage *outImage = psMatrixTranspose(NULL, inImage);
     72        ok(outImage == NULL, "psMatrixTranspose() returned NULL with incorrect input image type");
     73        psFree(inImage);
     74        psFree(outImage);
     75        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     76    }
     77
     78
    5879    psImage *inImage = (psImage*)psImageAlloc(3, 3, PS_TYPE_F64);
    5980    psImage *outImage = (psImage*)psImageAlloc(3, 3, PS_TYPE_F64);
     
    79100    inImageF32->data.F32[2][2] = 9;
    80101
    81     // Test A - Transpose input image into output image
     102    // Transpose input image into output image
    82103    {
    83104        psMemId id = psMemGetId();
     
    99120    }
    100121
    101     // Test B - Transpose input image into auto allocated NULL output image
     122
     123    // Transpose input image into auto allocated NULL output image
    102124    {
    103125        psMemId id = psMemGetId();
    104         psImage *outImageNull = NULL;
    105         outImageNull = psMatrixTranspose(outImageNull, inImage);
     126        psImage *outImageNull = psMatrixTranspose(NULL, inImage);
    106127        ok(!check_matrix(outImageNull), "Output image data set correctly");
    107128
    108         psImage *outImageNullF32 = NULL;
    109         outImageNullF32 = psMatrixTranspose(outImageNullF32, inImageF32);
     129        psImage *outImageNullF32 = psMatrixTranspose(NULL, inImageF32);
    110130        check_matrix(outImageNullF32);
    111131        ok(!check_matrix(outImageNullF32), "Output image data set correctly");
Note: See TracChangeset for help on using the changeset viewer.