IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 6, 2004, 12:34:06 PM (22 years ago)
Author:
desonia
Message:

astyle fixed?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/dataManip/tst_psMatrix01.c

    r1346 r1406  
    1111*  @author  Ross Harman, MHPCC
    1212*
    13 *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
    14 *  @date  $Date: 2004-07-30 02:55:47 $
     13*  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
     14*  @date  $Date: 2004-08-06 22:34:06 $
    1515*
    1616*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2323#define PRINT_MATRIX(IMAGE)                         \
    2424for(int i=IMAGE->numRows-1; i>-1; i--) {        \
    25         for(int j=0; j<IMAGE->numCols; j++) {       \
    26                 printf("%f ", IMAGE->data.F64[i][j]);   \
    27             }                                          \
    28         printf("\n");                              \
    29     }
    30    
     25    for(int j=0; j<IMAGE->numCols; j++) {       \
     26        printf("%f ", IMAGE->data.F64[i][j]);   \
     27    }                                          \
     28    printf("\n");                              \
     29}
     30
    3131int main( int argc,
    3232          char* argv[] )
    3333{
    3434    psImage * tempImage = NULL;
    35    
    36    
     35
     36
    3737    // Test A - Create input and output images
    3838    printPositiveTestHeader( stdout, "psMatrix", "Create input and output images" );
     
    5050    PRINT_MATRIX( inImage );
    5151    printFooter( stdout, "psMatrix", "Create input and output images", true );
    52    
    53    
     52
     53
    5454    // Test B - Transpose input image into output image
    5555    printPositiveTestHeader( stdout, "psMatrix", "Transpose input image into output image" );
     
    5858    PRINT_MATRIX( outImage );
    5959    if ( outImage->type.dimen != PS_DIMEN_IMAGE ) {
    60             printf( "Error: Resulting image is not PS_DIMEN_IMAGE\n" );
    61         } else if ( outImage != tempImage ) {
     60        printf( "Error: Resulting image is not PS_DIMEN_IMAGE\n" );
     61    } else
     62        if ( outImage != tempImage ) {
    6263            printf( "Error: Return pointer not equal to output argument pointer\n" );
    6364        }
    6465    printFooter( stdout, "psMatrix", "Transpose input image into output image", true );
    65    
    66    
     66
     67
    6768    // Test C -  Transpose input image into auto allocated NULL output image
    6869    printPositiveTestHeader( stdout, "psMatrix", "ranspose input image into auto allocated NULL output image" );
     
    7172    PRINT_MATRIX( outImageNull );
    7273    printFooter( stdout, "psMatrix", "ranspose input image into auto allocated NULL output image", true );
    73    
    74    
     74
     75
    7576    // Test D - Free images and check for leaks
    7677    printPositiveTestHeader( stdout, "psMatrix", "Free images and check for leaks" );
     
    8081    int nLeaks = psMemCheckLeaks( 0, NULL, stdout );
    8182    if ( nLeaks != 0 ) {
    82             printf( "ERROR: Found %d memory leaks\n", nLeaks );
    83         }
     83        printf( "ERROR: Found %d memory leaks\n", nLeaks );
     84    }
    8485    int nBad = psMemCheckCorruption( 0 );
    8586    if ( nBad ) {
    86             printf( "ERROR: Found %d bad memory blocks\n", nBad );
    87         }
     87        printf( "ERROR: Found %d bad memory blocks\n", nBad );
     88    }
    8889    printFooter( stdout, "psMatrix" , "Free images and check for leaks", true );
    89    
     90
    9091    return 0;
    9192}
Note: See TracChangeset for help on using the changeset viewer.