IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 9, 2004, 11:30:27 AM (22 years ago)
Author:
desonia
Message:

added some comments, etc.

File:
1 edited

Legend:

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

    r951 r958  
    4848        int currentId = psMemGetId();
    4949        int retVal = fcn();
    50         if (retVal == expectedReturn) {
     50        if (retVal == 0) { // only bother checking memory if test executed to end.
    5151            if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
    5252                psError(__func__,"Memory Leaks Detected");
     
    5757        exit(retVal);
    5858    } else if (child < 0) {
    59         fprintf(fp,"Couldn't fork a process to run a negative test (%s|%s)", packageName, testPointName);
     59        fprintf(fp,"Couldn't fork a process to run a negative test (%s|%s)",
     60                packageName, testPointName);
    6061        abort();
    6162    }
     
    6465
    6566    if (childReturn != expectedReturn) {
    66         fprintf(fp,"Return value mismatch: expected %d, got %d",expectedReturn,childReturn);
     67        fprintf(fp,"Return value mismatch: expected %d, got %d",
     68                expectedReturn,childReturn);
    6769    }
    6870
    69     p_printFooter(fp,testPointFile,packageName,testPointName, (childReturn==expectedReturn));
     71    p_printFooter(fp,testPointFile,packageName,testPointName,
     72                  (childReturn==expectedReturn));
    7073
    7174    return (childReturn==expectedReturn);
    7275}
    7376
    74 void p_printPositiveTestHeader(FILE *fp, const char* testPointFile, const char* packageName, const char*
    75                                testPointName)
     77void p_printPositiveTestHeader(FILE *fp,
     78                               const char* testPointFile,
     79                               const char* packageName,
     80                               const char* testPointName)
    7681{
    7782    char TP[80];
     
    8691}
    8792
    88 void p_printNegativeTestHeader(FILE *fp, const char* testPointFile, const char* packageName,
    89                                const char* testPointName,const char* expectedError, int exitValue)
     93void p_printNegativeTestHeader(FILE *fp,
     94                               const char* testPointFile,
     95                               const char* packageName,
     96                               const char* testPointName,
     97                               const char* expectedError,
     98                               int exitValue)
    9099{
    91100    char TP[80];
     
    103112
    104113
    105 void p_printFooter(FILE *fp, const char* testPointFile, const char* packageName,const char* testPointName, bool success)
     114void p_printFooter(FILE *fp,
     115                   const char* testPointFile,
     116                   const char* packageName,
     117                   const char* testPointName,
     118                   bool success)
    106119{
    107120    if (success) {
Note: See TracChangeset for help on using the changeset viewer.