IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 27, 2004, 4:31:54 PM (22 years ago)
Author:
desonia
Message:

added runTest and runTestSuite to the mix.

File:
1 edited

Legend:

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

    r526 r538  
    1515p_printFooter(filePtr, __FILE__, packageName, testPointName, success)
    1616
     17typedef int (*testFcn)(void);
     18
     19typedef struct
     20{
     21    testFcn     fcn;
     22    const char* testPointName;
     23    int         expectedReturn;
     24}
     25testDescription;
     26
     27#define runTest(filePtr, packageName, testPointName, fcn, expectedReturn) \
     28p_runTest(filePtr, __FILE__, packageName, testPointName, fcn, expectedReturn)
     29
     30#define runTestSuite(filePtr, packageName, tests) \
     31p_runTestSuite(filePtr, __FILE__, packageName, tests)
     32
    1733
    1834/////////////////////////// PRIVATE FUNCTIONS //////////////////////////////
    1935
    20 void p_printPositiveTestHeader(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName);
     36bool p_runTest(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,
     37               testFcn fcn, int expectedReturn);
     38
     39bool p_runTestSuite(FILE *fp, const char* testPointFile, const char* packageName, testDescription tests[]);
     40
     41void p_printPositiveTestHeader(FILE *fp, const char* testPointFile, const char* packageName,
     42                               const char* testPointName);
    2143
    2244void p_printNegativeTestHeader(FILE *fp, const char* testPointFile, const char* packageName,
    2345                               const char* testPointName,const char* expectedError, int exitValue);
    2446
    25 void p_printFooter(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName, bool
    26                    success);
     47void p_printFooter(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,
     48                   bool success);
     49
    2750#endif
Note: See TracChangeset for help on using the changeset viewer.