IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 26, 2004, 2:57:34 PM (22 years ago)
Author:
desonia
Message:

converted native C types to ps Types, where practical.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/psTest.c

    r1810 r2204  
    2828#define HEADER_BOTTOM "\\**********************************************************************************/\n\n"
    2929
    30 bool p_runTestSuite( FILE *fp, const char* testPointFile, const char* packageName,
    31                      testDescription tests[], int argc, char * const argv[] )
    32 {
    33     bool success = true;
    34     bool runAll = true;
    35     bool useFork = true;
    36     bool found;
    37     int c;
    38     int n;
     30psBool p_runTestSuite( FILE *fp, const char* testPointFile, const char* packageName,
     31                       testDescription tests[], psS32 argc, char * const argv[] )
     32{
     33    psBool success = true;
     34    psBool runAll = true;
     35    psBool useFork = true;
     36    psBool found;
     37    psS32 c;
     38    psS32 n;
    3939    extern char *optarg;
    4040
     
    6262                printf( "Testpoints:\n" );
    6363                runAll = false;
    64                 for ( int index = 0; tests[ index ].fcn != NULL; index++ ) {
     64                for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) {
    6565                    printf( "    %6d - %s \n", tests[ index ].testPointNumber,
    6666                            tests[ index ].testPointName );
     
    7070            case 't':
    7171                runAll = false;
    72                 for ( int index = 0; tests[ index ].fcn != NULL; index++ ) {
     72                for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) {
    7373                    if ( strcmp( optarg, tests[ index ].testPointName ) == 0 ) {
    7474                        success = p_runTest( fp,
     
    9090                }
    9191                found = false;
    92                 for ( int index = 0; tests[ index ].fcn != NULL; index++ ) {
     92                for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) {
    9393                    if ( n == tests[ index ].testPointNumber ) {
    9494                        found = true;
     
    116116
    117117    if ( runAll ) {
    118         for ( int index = 0; tests[ index ].fcn != NULL; index++ ) {
     118        for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) {
    119119            if ( ! tests[ index ].isDuplicateEntry ) {
    120120                success = p_runTest( fp,
     
    136136}
    137137
    138 bool p_runTest( FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,
    139                 testFcn fcn, int expectedReturn, bool useFork )
    140 {
    141     int childReturn = 0;
     138psBool p_runTest( FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,
     139                  testFcn fcn, psS32 expectedReturn, psBool useFork )
     140{
     141    psS32 childReturn = 0;
    142142    pid_t child;
    143143
     
    147147        child = fork();
    148148        if ( child == 0 ) {                   // I am the child process, run the test
    149             int currentId = psMemGetId();
    150             int retVal = fcn();
     149            psS32 currentId = psMemGetId();
     150            psS32 retVal = fcn();
    151151            if ( retVal == 0 ) { // only bother checking memory if test executed to end.
    152152                if ( psMemCheckLeaks( currentId, NULL, stderr ) != 0 ) {
     
    171171        }
    172172    } else {
    173         int currentId = psMemGetId();
     173        psS32 currentId = psMemGetId();
    174174        childReturn = fcn();
    175175        if ( childReturn == 0 ) { // only bother checking memory if test executed to end.
     
    215215                                const char* testPointName,
    216216                                const char* expectedError,
    217                                 int exitValue )
     217                                psS32 exitValue )
    218218{
    219219    char TP[ 80 ];
     
    235235                    const char* packageName,
    236236                    const char* testPointName,
    237                     bool success )
     237                    psBool success )
    238238{
    239239    if ( success ) {
Note: See TracChangeset for help on using the changeset viewer.