Changeset 4293 for trunk/psLib/src/psTest.h
- Timestamp:
- Jun 16, 2005, 2:11:08 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/psTest.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/psTest.h
r4162 r4293 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $8 * @date $Date: 2005-06- 08 23:40:45 $7 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2005-06-17 00:10:55 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 29 29 p_printFooter(filePtr, __FILE__, packageName, testPointName, success) 30 30 31 /** Specifies the format of a user-defined function for use with psTest functions. */ 31 32 typedef psS32 (*testFcn)(void); 32 33 34 /** Defines a data structure containing test description information. */ 33 35 typedef struct 34 36 { 35 testFcn fcn; 36 psS32 testPointNumber; 37 const char* testPointName; 38 psS32 expectedReturn; 39 psBool isDuplicateEntry; 37 testFcn fcn; ///< Specified test function 38 psS32 testPointNumber; ///< Test Point Number 39 const char* testPointName; ///< Test Point Name 40 psS32 expectedReturn; ///< Expected return value 41 psBool isDuplicateEntry; ///< Is the entry a duplicate? 40 42 } 41 43 testDescription; … … 50 52 /////////////////////////// PRIVATE FUNCTIONS ////////////////////////////// 51 53 54 ///XXX: Comments correct? 55 56 /** Procedure used to run a test. 57 * 58 * @return psBool: True if successful. 59 */ 52 60 psBool p_runTest( 53 FILE *fp, 54 const char* testPointFile, 55 const char* packageName, 56 const char* testPointName, 57 testFcn fcn, 58 psS32 expectedReturn, 59 psBool useFork 61 FILE *fp, ///< File to test 62 const char* testPointFile, ///< Test point in file 63 const char* packageName, ///< Package name 64 const char* testPointName, ///< Test point name 65 testFcn fcn, ///< Function tested 66 psS32 expectedReturn, ///< Expected return 67 psBool useFork ///< Fork to use 60 68 ); 61 69 70 /** Procedure used to run the test suite. 71 * 72 * @return psBool: True if successful. 73 */ 62 74 psBool p_runTestSuite( 63 FILE *fp, 64 const char* testPointFile, 65 const char* packageName, 66 testDescription tests[], 67 psS32 argc, 68 char * const argv[] 75 FILE *fp, ///< File to test 76 const char* testPointFile, ///< Test point in file 77 const char* packageName, ///< Package name 78 testDescription tests[], ///< Description of tests 79 psS32 argc, ///< Number of test arguments 80 char * const argv[] ///< Test arguments 69 81 ); 70 82 83 /** Prints a positive test header to file */ 71 84 void p_printPositiveTestHeader( 72 FILE *fp, 73 const char* testPointFile, 74 const char* packageName, 75 const char* testPointName 85 FILE *fp, ///< File to which to print 86 const char* testPointFile, ///< Test point in file 87 const char* packageName, ///< Package name 88 const char* testPointName ///< Test point name 76 89 ); 77 90 91 /** Prints a negative test header to file */ 78 92 void p_printNegativeTestHeader( 79 FILE *fp, 80 const char* testPointFile, 81 const char* packageName, 82 const char* testPointName, 83 const char* expectedError, 84 psS32 exitValue 93 FILE *fp, ///< File to which to print 94 const char* testPointFile, ///< Test point in file 95 const char* packageName, ///< Package name 96 const char* testPointName, ///< Test point name 97 const char* expectedError, ///< Expected error 98 psS32 exitValue ///< Exit value 85 99 ); 86 100 101 /** Prints a footer to file */ 87 102 void p_printFooter( 88 FILE *fp, 89 const char* testPointFile, 90 const char* packageName, 91 const char* testPointName, 92 psBool success 103 FILE *fp, ///< File to which to print 104 const char* testPointFile, ///< Test point in file 105 const char* packageName, ///< Package name 106 const char* testPointName, ///< Test point name 107 psBool success ///< True if successful 93 108 ); 94 109
Note:
See TracChangeset
for help on using the changeset viewer.
