IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 4, 2004, 10:18:12 AM (22 years ago)
Author:
harman
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/collections/tst_psVector_01.c

    r831 r868  
    99 *     D)  Reallocate S32 vector smaller
    1010 *     E)  Free S32 vector
    11  *
     11 *     F)  Attempt to create a S32 vector with zero size
     12 *
    1213 *  @author  Ross Harman, MHPCC
    1314 *
    14  *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    15  *  @date  $Date: 2004-06-02 23:29:29 $
     15 *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
     16 *  @date  $Date: 2004-06-04 20:18:12 $
    1617 *
    1718 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3132    psVector *psVec = psVectorAlloc(5, PS_TYPE_S32);
    3233    printf("Vector size = %d\n", psVec->nalloc);
    33     printf("Vector population = %d\n", psVec->n);
     34    printf("Vector type = %d\n", psVec->type.type);
     35    printf("Vector dimen = %d\n", psVec->type.dimen);
     36    printf("Vector size = %d\n", psVec->nalloc);
    3437    printFooter(stdout, "psVector", "Create S32 vector", true);
    3538
     
    8386    printFooter(stdout, "psVector" ,"Free S32 vector", true);
    8487
     88    // Test F - Attempt to create a S32 vector with zero size
     89    printNegativeTestHeader(stdout,"psVector", "Attempt to create a S32 vector with zero size",
     90                            "Invalid value for nalloc", 0);
     91    psVector *vecBad = psVectorAlloc(0, PS_TYPE_S32);
     92    if(vecBad != NULL) {
     93        printf("ERROR: Return is not NULL\n");
     94    }
     95    printFooter(stdout, "psVector", "Attempt to create a S32 vector with zero size", true);
     96
    8597    return 0;
    8698}
Note: See TracChangeset for help on using the changeset viewer.