IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 9, 2006, 3:41:37 PM (20 years ago)
Author:
gusciora
Message:

This removes the tests for NULL arguments.

Location:
trunk/psModules/test/config
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/test/config/tst_pmConfig.c

    r6360 r6414  
    1313 * pmConfigDB()
    1414 *
    15  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    16  *  @date $Date: 2006-02-08 01:57:44 $
     15 * XXXX: Must determine what to do with NULL arguments, then test it.
     16 *
     17 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     18 *  @date $Date: 2006-02-10 01:41:37 $
    1719 *
    1820 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6870    psS32 argc = 3;
    6971
     72
    7073    psMetadata *nullMD = NULL;
    71     printf("----------------------------------------------------------------\n");
    72     printf("Calling pmConfigRead() with NULL site pointer.  Should generate ERROR, return false.\n");
    73     rc = pmConfigRead(NULL, &camera, &recipe, &argc, str, "RecipeName");
    74     if (rc == true) {
    75         printf("TEST ERROR: pmConfigRead() returned true\n");
    76         testStatus = false;
    77     }
    78 
    79     printf("----------------------------------------------------------------\n");
    80     printf("Calling pmConfigRead() with NULL *site pointer.  Should generate ERROR, return false.\n");
    81     rc = pmConfigRead(&nullMD, &camera, &recipe, &argc, str, "RecipeName");
    82     if (rc == true) {
    83         printf("TEST ERROR: pmConfigRead() returned true\n");
    84         testStatus = false;
    85     }
    86 
    87     printf("----------------------------------------------------------------\n");
    88     printf("Calling pmConfigRead() with NULL camera pointer.  Should generate ERROR, return false.\n");
    89     rc = pmConfigRead(&site, NULL, &recipe, &argc, str, "RecipeName");
    90     if (rc == true) {
    91         printf("TEST ERROR: pmConfigRead() returned true\n");
    92         testStatus = false;
    93     }
    94 
    95     printf("----------------------------------------------------------------\n");
    96     printf("Calling pmConfigRead() with NULL *camera pointer.  Should generate ERROR, return false.\n");
    97     rc = pmConfigRead(&site, &nullMD, &recipe, &argc, str, "RecipeName");
    98     if (rc == true) {
    99         printf("TEST ERROR: pmConfigRead() returned true\n");
    100         testStatus = false;
    101     }
    102 
    103     printf("----------------------------------------------------------------\n");
    104     printf("Calling pmConfigRead() with NULL recipe pointer.  Should generate ERROR, return false.\n");
    105     rc = pmConfigRead(&site, &camera, NULL, &argc, str, "RecipeName");
    106     if (rc == true) {
    107         printf("TEST ERROR: pmConfigRead() returned true\n");
    108         testStatus = false;
    109     }
    110 
    111     printf("----------------------------------------------------------------\n");
    112     printf("Calling pmConfigRead() with NULL *recipe pointer.  Should generate ERROR, return false.\n");
    113     rc = pmConfigRead(&site, &camera, &nullMD, &argc, str, "RecipeName");
    114     if (rc == true) {
    115         printf("TEST ERROR: pmConfigRead() returned true\n");
    116         testStatus = false;
    117     }
    118 
    119     printf("----------------------------------------------------------------\n");
    120     printf("Calling pmConfigRead() with NULL argv pointer.  Should generate ERROR, return false.\n");
    121     rc = pmConfigRead(&site, &camera, &recipe, &argc, NULL, "RecipeName");
    122     if (rc == true) {
    123         printf("TEST ERROR: pmConfigRead() returned true\n");
    124         testStatus = false;
    125     }
    126 
    127     printf("----------------------------------------------------------------\n");
    128     printf("Calling pmConfigRead() with negative argc.  Should generate ERROR, return false.\n");
    129     psS32 tmpArgc = -1;
    130     rc = pmConfigRead(&site, &camera, &recipe, &tmpArgc, str, "RecipeName");
    131     if (rc == true) {
    132         printf("TEST ERROR: pmConfigRead() returned true\n");
    133         testStatus = false;
     74    if (0) {
     75        printf("----------------------------------------------------------------\n");
     76        printf("Calling pmConfigRead() with NULL site pointer.  Should generate ERROR, return false.\n");
     77        rc = pmConfigRead(NULL, &camera, &recipe, &argc, str, "RecipeName");
     78        if (rc == true) {
     79            printf("TEST ERROR: pmConfigRead() returned true\n");
     80            testStatus = false;
     81        }
     82
     83        printf("----------------------------------------------------------------\n");
     84        printf("Calling pmConfigRead() with NULL *site pointer.  Should generate ERROR, return false.\n");
     85        rc = pmConfigRead(&nullMD, &camera, &recipe, &argc, str, "RecipeName");
     86        if (rc == true) {
     87            printf("TEST ERROR: pmConfigRead() returned true\n");
     88            testStatus = false;
     89        }
     90
     91        printf("----------------------------------------------------------------\n");
     92        printf("Calling pmConfigRead() with NULL camera pointer.  Should generate ERROR, return false.\n");
     93        rc = pmConfigRead(&site, NULL, &recipe, &argc, str, "RecipeName");
     94        if (rc == true) {
     95            printf("TEST ERROR: pmConfigRead() returned true\n");
     96            testStatus = false;
     97        }
     98
     99        printf("----------------------------------------------------------------\n");
     100        printf("Calling pmConfigRead() with NULL *camera pointer.  Should generate ERROR, return false.\n");
     101        rc = pmConfigRead(&site, &nullMD, &recipe, &argc, str, "RecipeName");
     102        if (rc == true) {
     103            printf("TEST ERROR: pmConfigRead() returned true\n");
     104            testStatus = false;
     105        }
     106
     107        printf("----------------------------------------------------------------\n");
     108        printf("Calling pmConfigRead() with NULL recipe pointer.  Should generate ERROR, return false.\n");
     109        rc = pmConfigRead(&site, &camera, NULL, &argc, str, "RecipeName");
     110        if (rc == true) {
     111            printf("TEST ERROR: pmConfigRead() returned true\n");
     112            testStatus = false;
     113        }
     114
     115        printf("----------------------------------------------------------------\n");
     116        printf("Calling pmConfigRead() with NULL *recipe pointer.  Should generate ERROR, return false.\n");
     117        rc = pmConfigRead(&site, &camera, &nullMD, &argc, str, "RecipeName");
     118        if (rc == true) {
     119            printf("TEST ERROR: pmConfigRead() returned true\n");
     120            testStatus = false;
     121        }
     122
     123        printf("----------------------------------------------------------------\n");
     124        printf("Calling pmConfigRead() with NULL argv pointer.  Should generate ERROR, return false.\n");
     125        rc = pmConfigRead(&site, &camera, &recipe, &argc, NULL, "RecipeName");
     126        if (rc == true) {
     127            printf("TEST ERROR: pmConfigRead() returned true\n");
     128            testStatus = false;
     129        }
     130
     131        printf("----------------------------------------------------------------\n");
     132        printf("Calling pmConfigRead() with negative argc.  Should generate ERROR, return false.\n");
     133        psS32 tmpArgc = -1;
     134        rc = pmConfigRead(&site, &camera, &recipe, &tmpArgc, str, "RecipeName");
     135        if (rc == true) {
     136            printf("TEST ERROR: pmConfigRead() returned true\n");
     137            testStatus = false;
     138        }
    134139    }
    135140
  • trunk/psModules/test/config/verified/tst_pmConfig.stderr

    r6360 r6414  
    55\**********************************************************************************/
    66
    7 <HOST>|E|pmConfigRead (FILE:LINENO)
    8     Unallowable operation: site is NULL.
    9 <HOST>|E|pmConfigRead (FILE:LINENO)
    10     Unallowable operation: *site is NULL.
    11 <HOST>|E|pmConfigRead (FILE:LINENO)
    12     Unallowable operation: camera is NULL.
    13 <HOST>|E|pmConfigRead (FILE:LINENO)
    14     Unallowable operation: *camera is NULL.
    15 <HOST>|E|pmConfigRead (FILE:LINENO)
    16     Unallowable operation: recipe is NULL.
    17 <HOST>|E|pmConfigRead (FILE:LINENO)
    18     Unallowable operation: *recipe is NULL.
    19 <HOST>|E|pmConfigRead (FILE:LINENO)
    20     Unallowable operation: argv is NULL.
    21 <HOST>|E|pmConfigRead (FILE:LINENO)
    22     Error: *argc is 0 or less.
    237<HOST>|I|readConfig
    248    Loading site configuration from file SampleIPPConfig
  • trunk/psModules/test/config/verified/tst_pmConfig.stdout

    r6325 r6414  
    1 ----------------------------------------------------------------
    2 Calling pmConfigRead() with NULL site pointer.  Should generate ERROR, return false.
    3 ----------------------------------------------------------------
    4 Calling pmConfigRead() with NULL *site pointer.  Should generate ERROR, return false.
    5 ----------------------------------------------------------------
    6 Calling pmConfigRead() with NULL camera pointer.  Should generate ERROR, return false.
    7 ----------------------------------------------------------------
    8 Calling pmConfigRead() with NULL *camera pointer.  Should generate ERROR, return false.
    9 ----------------------------------------------------------------
    10 Calling pmConfigRead() with NULL recipe pointer.  Should generate ERROR, return false.
    11 ----------------------------------------------------------------
    12 Calling pmConfigRead() with NULL *recipe pointer.  Should generate ERROR, return false.
    13 ----------------------------------------------------------------
    14 Calling pmConfigRead() with NULL argv pointer.  Should generate ERROR, return false.
    15 ----------------------------------------------------------------
    16 Calling pmConfigRead() with negative argc.  Should generate ERROR, return false.
    171----------------------------------------------------------------
    182Calling pmConfigRead() with acceptable arguments.
Note: See TracChangeset for help on using the changeset viewer.