IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1851


Ignore:
Timestamp:
Sep 22, 2004, 1:47:09 PM (22 years ago)
Author:
evanalst
Message:

Convert psError test driver to use runTestSuite.

Location:
trunk/psLib/test/sysUtils
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/sysUtils/tst_psError.c

    r1406 r1851  
    1010 *  @author  Eric Van Alst, MHPCC
    1111 *
    12  *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
    13  *  @date  $Date: 2004-08-06 22:34:06 $
     12 *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
     13 *  @date  $Date: 2004-09-22 23:47:09 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2222#include "psTest.h"
    2323
    24 int main(int argc,
    25          char* argv[])
     24static int testError00(void);
     25
     26testDescription tests[] = {
     27                              {testError00, 0, "psError()", 0, false},
     28                              {NULL}
     29                          };
     30
     31int main( int argc, char* argv[] )
     32{
     33    psLogSetLevel( PS_LOG_INFO );
     34
     35    return ( !runTestSuite(stderr, "psError", tests, argc, argv) );
     36}
     37
     38static int testError00(void)
    2639{
    2740
     
    3144    char  charval = 'E';
    3245    char *stringval = "E R R O R";
    33     int   memBlockAllocated = 0;
    34     psMemBlock  ***memBlockPtr = NULL;
    3546
    3647    // Test point #1 Multiple type values placed in the error string
     
    5162    printFooter(stderr, "psError","Empty strings in error message",true);
    5263
    53     // Check for memory leaks
    54     memBlockAllocated = psMemCheckLeaks(0, memBlockPtr, stderr);
    55     if ( memBlockAllocated != 0 ) {
    56         fprintf(stderr,"FAIL - Memory leak detected - Number of blocks = %d\n",memBlockAllocated);
    57     }
    58     // Check for memory corruption and abort if detected
    59     memBlockAllocated = psMemCheckCorruption(1);
    60 
    6164    return 0;
    6265}
  • trunk/psLib/test/sysUtils/verified/tst_psError.stderr

    r1761 r1851  
     1/***************************** TESTPOINT ******************************************\
     2*             TestFile: tst_psError.c                                              *
     3*            TestPoint: psError{psError()}                                         *
     4*             TestType: Positive                                                   *
     5\**********************************************************************************/
     6
    17/***************************** TESTPOINT ******************************************\
    28*             TestFile: tst_psError.c                                              *
     
    511\**********************************************************************************/
    612
    7 <DATE><TIME>|<HOST>|E|main
     13<DATE><TIME>|<HOST>|E|testError00
    814    ALL TYPES intval = 1 longval = 2 floatval = 3.010000 charval = E strval = E R R O R
    915
     
    3137---> TESTPOINT PASSED (psError{Empty strings in error message} | tst_psError.c)
    3238
     39
     40---> TESTPOINT PASSED (psError{psError()} | tst_psError.c)
     41
Note: See TracChangeset for help on using the changeset viewer.