Changeset 526 for trunk/psLib/test/psTest.c
- Timestamp:
- Apr 26, 2004, 4:20:28 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/psTest.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/psTest.c
r509 r526 18 18 #define HEADER_BOTTOM "\\------------------------------------------------------------------------/\n\n" 19 19 20 void p_printPositiveTestHeader( const char* testPointFile, const char* packageName, const char* testPointName)20 void p_printPositiveTestHeader(FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName) 21 21 { 22 22 char TP[80]; … … 24 24 snprintf(TP,80,"%s{%s}",packageName,testPointName); 25 25 26 printf(HEADER_TOP);27 printf(HEADER_LINE_STRING, "TestFile", testPointFile);28 printf(HEADER_LINE_STRING, "TestPoint", TP);29 printf(HEADER_LINE_STRING, "TestType","Positive");30 printf(HEADER_BOTTOM);26 fprintf(fp, HEADER_TOP); 27 fprintf(fp, HEADER_LINE_STRING, "TestFile", testPointFile); 28 fprintf(fp, HEADER_LINE_STRING, "TestPoint", TP); 29 fprintf(fp, HEADER_LINE_STRING, "TestType","Positive"); 30 fprintf(fp, HEADER_BOTTOM); 31 31 } 32 32 33 void p_printNegativeTestHeader( const char* testPointFile, const char* packageName,33 void p_printNegativeTestHeader(FILE *fp, const char* testPointFile, const char* packageName, 34 34 const char* testPointName,const char* expectedError, int exitValue) 35 35 { … … 38 38 snprintf(TP,80,"%s{%s}",packageName,testPointName); 39 39 40 printf(HEADER_TOP);41 printf(HEADER_LINE_STRING, "TestFile", testPointFile);42 printf(HEADER_LINE_STRING, "TestPoint", TP);43 printf(HEADER_LINE_STRING,"TestType","Negative");44 printf(HEADER_LINE_STRING,"ExpectedErrorText",expectedError);45 printf(HEADER_LINE_INT,"ExpectedStatusValue",exitValue);46 printf(HEADER_BOTTOM);40 fprintf(fp, HEADER_TOP); 41 fprintf(fp, HEADER_LINE_STRING, "TestFile", testPointFile); 42 fprintf(fp, HEADER_LINE_STRING, "TestPoint", TP); 43 fprintf(fp, HEADER_LINE_STRING,"TestType","Negative"); 44 fprintf(fp, HEADER_LINE_STRING,"ExpectedErrorText",expectedError); 45 fprintf(fp, HEADER_LINE_INT,"ExpectedStatusValue",exitValue); 46 fprintf(fp, HEADER_BOTTOM); 47 47 } 48 48 49 49 50 void p_printFooter( const char* testPointFile, const char* packageName,const char* testPointName, bool success)50 void p_printFooter(FILE *fp, const char* testPointFile, const char* packageName,const char* testPointName, bool success) 51 51 { 52 52 if (success) { 53 printf("\n---> TESTPOINT PASSED (%s{%s} | %s)\n\n", packageName,testPointName, testPointFile);53 fprintf(fp, "\n---> TESTPOINT PASSED (%s{%s} | %s)\n\n", packageName,testPointName, testPointFile); 54 54 } else { 55 printf("\n---> TESTPOINT FAILED (%s{%s} | %s)\n\n", packageName,testPointName,testPointFile);55 fprintf(fp, "\n---> TESTPOINT FAILED (%s{%s} | %s)\n\n", packageName,testPointName,testPointFile); 56 56 } 57 57 }
Note:
See TracChangeset
for help on using the changeset viewer.
