Changeset 958
- Timestamp:
- Jun 9, 2004, 11:30:27 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/psTest.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/psTest.c
r951 r958 48 48 int currentId = psMemGetId(); 49 49 int retVal = fcn(); 50 if (retVal == expectedReturn) {50 if (retVal == 0) { // only bother checking memory if test executed to end. 51 51 if (psMemCheckLeaks(currentId,NULL,stderr) != 0) { 52 52 psError(__func__,"Memory Leaks Detected"); … … 57 57 exit(retVal); 58 58 } 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); 60 61 abort(); 61 62 } … … 64 65 65 66 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); 67 69 } 68 70 69 p_printFooter(fp,testPointFile,packageName,testPointName, (childReturn==expectedReturn)); 71 p_printFooter(fp,testPointFile,packageName,testPointName, 72 (childReturn==expectedReturn)); 70 73 71 74 return (childReturn==expectedReturn); 72 75 } 73 76 74 void p_printPositiveTestHeader(FILE *fp, const char* testPointFile, const char* packageName, const char* 75 testPointName) 77 void p_printPositiveTestHeader(FILE *fp, 78 const char* testPointFile, 79 const char* packageName, 80 const char* testPointName) 76 81 { 77 82 char TP[80]; … … 86 91 } 87 92 88 void p_printNegativeTestHeader(FILE *fp, const char* testPointFile, const char* packageName, 89 const char* testPointName,const char* expectedError, int exitValue) 93 void p_printNegativeTestHeader(FILE *fp, 94 const char* testPointFile, 95 const char* packageName, 96 const char* testPointName, 97 const char* expectedError, 98 int exitValue) 90 99 { 91 100 char TP[80]; … … 103 112 104 113 105 void p_printFooter(FILE *fp, const char* testPointFile, const char* packageName,const char* testPointName, bool success) 114 void p_printFooter(FILE *fp, 115 const char* testPointFile, 116 const char* packageName, 117 const char* testPointName, 118 bool success) 106 119 { 107 120 if (success) {
Note:
See TracChangeset
for help on using the changeset viewer.
