IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 12, 2004, 12:28:16 PM (22 years ago)
Author:
evanalst
Message:

Add addition case to test for psArrayRealloc with NULL array.

File:
1 edited

Legend:

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

    r2273 r2354  
    1212 *  @author  Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
    15  *  @date  $Date: 2004-11-04 01:05:00 $
     14 *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
     15 *  @date  $Date: 2004-11-12 22:28:16 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3737    // Create array of pointers
    3838    testStruct *mySt[10];
    39 
     39    psArray *psArr1 = NULL;
    4040
    4141    // Test A - Create void pointer array
     
    138138    printFooter(stdout, "psArray", "Reallocate integer void pointer smaller", true);
    139139
     140    // Test D1 - Reallocate with a null
     141    printNegativeTestHeader(stdout,"psArray","Reallocate with a null array",
     142                            "Error message generator", 0 );
     143    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message.");
     144    psArr1 = psArrayRealloc(NULL,5);
     145    if ( psArr1 != NULL ) {
     146        printf("ERROR: Return is not NULL\n");
     147    }
     148    printFooter(stdout,"psArray","Reallocate with a null array",true);
    140149
    141150    // Test E - Free void pointer array
Note: See TracChangeset for help on using the changeset viewer.