Changeset 560 for trunk/psLib/test/sysUtils
- Timestamp:
- May 1, 2004, 1:04:35 PM (22 years ago)
- Location:
- trunk/psLib/test/sysUtils
- Files:
-
- 30 added
- 11 edited
-
Makefile (modified) (6 diffs)
-
tst_psHash00.c (added)
-
tst_psHash01.c (added)
-
tst_psHash02.c (added)
-
tst_psHash03.c (added)
-
tst_psHash04.c (added)
-
tst_psLogMsg00.c (added)
-
tst_psLogMsg01.c (added)
-
tst_psLogMsg02.c (added)
-
tst_psLogMsg03.c (added)
-
tst_psTrace00.c (modified) (5 diffs)
-
tst_psTrace01.c (modified) (3 diffs)
-
tst_psTrace02.c (modified) (2 diffs)
-
tst_psTrace03.c (modified) (2 diffs)
-
tst_psTrace04.c (added)
-
verified/tst_psHash00.stderr (added)
-
verified/tst_psHash00.stdout (added)
-
verified/tst_psHash01.stderr (added)
-
verified/tst_psHash01.stdout (added)
-
verified/tst_psHash02.stderr (added)
-
verified/tst_psHash02.stdout (added)
-
verified/tst_psHash03.stderr (added)
-
verified/tst_psHash03.stdout (added)
-
verified/tst_psHash04.stderr (added)
-
verified/tst_psHash04.stdout (added)
-
verified/tst_psLogMsg00.stderr (added)
-
verified/tst_psLogMsg00.stdout (added)
-
verified/tst_psLogMsg01.stderr (added)
-
verified/tst_psLogMsg01.stdout (added)
-
verified/tst_psLogMsg02.stderr (added)
-
verified/tst_psLogMsg02.stdout (added)
-
verified/tst_psLogMsg03.stderr (added)
-
verified/tst_psLogMsg03.stdout (added)
-
verified/tst_psTrace00.stderr (modified) (1 diff)
-
verified/tst_psTrace00.stdout (modified) (1 diff)
-
verified/tst_psTrace01.stderr (modified) (1 diff)
-
verified/tst_psTrace01.stdout (modified) (1 diff)
-
verified/tst_psTrace02.stdout (modified) (1 diff)
-
verified/tst_psTrace03.stdout (modified) (2 diffs)
-
verified/tst_psTrace04.stderr (added)
-
verified/tst_psTrace04.stdout (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sysUtils/Makefile
r557 r560 3 3 ## Makefile: test/sysUtils 4 4 ## 5 ## $Revision: 1. 5$ $Name: not supported by cvs2svn $6 ## $Date: 2004-0 4-30 06:19:57$5 ## $Revision: 1.6 $ $Name: not supported by cvs2svn $ 6 ## $Date: 2004-05-01 23:04:35 $ 7 7 ## 8 8 ## Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 10 10 ############################################################################### 11 11 12 ############################################################################### 13 # Note: I added specific entries for the psTrace files. The reason I did 14 # this was because the generic rules were failing on the existing test 15 # code (and hence, on my tst_psTraceXX.c code as well). I am tempted to 16 # fix the generic rules, but that might break existing codes. When this 17 # problem is resolved, I'll remove the specific rules for psTrace. -GLG 18 # Also, psLogMsg. 19 # Also, psHash. 20 ############################################################################### 12 21 include ../../src/Makefile.Globals 13 22 … … 20 29 atst_psAbort_02 \ 21 30 atst_psAbort_03 \ 22 tst_psTrace00 \23 tst_psTrace01 \24 tst_psTrace02 \25 tst_psTrace03 \26 31 tst_psStringCopy 32 TARGET_TRACE = tst_psTrace00 tst_psTrace01 tst_psTrace02 tst_psTrace03 \ 33 tst_psTrace04 34 TARGET_LOGMSG = tst_psLogMsg00 tst_psLogMsg01 tst_psLogMsg02 tst_psLogMsg03 35 TARGET_HASH = tst_psHash00 tst_psHash01 tst_psHash02 tst_psHash03 tst_psHash04 27 36 28 all: $(TARGET) 37 all: $(TARGET) 38 psTrace: $(TARGET_TRACE) 39 psLogMsg: $(TARGET_LOGMSG) 40 psHash: $(TARGET_HASH) 29 41 30 42 tst_psError: tst_psError.o … … 37 49 @echo " Deleting executable and binary files for 'test/sysUtils'" 38 50 $(RM) $(TARGET) *.o *.lint 51 52 tst_psHash00: tst_psHash00.c 53 $(CC) tst_psHash00.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psHash00 54 55 tst_psHash01: tst_psHash01.c 56 $(CC) tst_psHash01.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psHash01 57 58 tst_psHash02: tst_psHash02.c 59 $(CC) tst_psHash02.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psHash02 60 61 tst_psHash03: tst_psHash03.c 62 $(CC) tst_psHash03.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psHash03 63 64 tst_psHash04: tst_psHash04.c 65 $(CC) tst_psHash04.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psHash04 66 67 tst_psLogMsg00: tst_psLogMsg00.c 68 $(CC) tst_psLogMsg00.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psLogMsg00 69 70 tst_psLogMsg01: tst_psLogMsg01.c 71 $(CC) tst_psLogMsg01.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psLogMsg01 72 73 tst_psLogMsg02: tst_psLogMsg02.c 74 $(CC) tst_psLogMsg02.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psLogMsg02 75 76 tst_psLogMsg03: tst_psLogMsg03.c 77 $(CC) tst_psLogMsg03.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psLogMsg03 39 78 40 79 tst_psTrace00: tst_psTrace00.c … … 50 89 $(CC) tst_psTrace03.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psTrace03 51 90 91 tst_psTrace04: tst_psTrace04.c 92 $(CC) tst_psTrace04.c $(LDFLAGS) -L$(PSLIB_LIB_DIR) -L.. -lpslib -lpstest -I$(PSLIB_INCL_DIR) -I.. -o tst_psTrace04 93 52 94 %.o : %.c 53 95 $(CC) $(CFLAGS) $(CPPFLAGS) -I.. -I$(PSLIB_INCL_DIR) -c -o $@ $< … … 60 102 61 103 distclean: 62 rm DistCleanFiles104 rm -rf $(TARGET_TRACE) $(TARGET_LOGMSG) $(TARGET_HASH) -
trunk/psLib/test/sysUtils/tst_psTrace00.c
r558 r560 10 10 int i = 0; 11 11 int lev = 0; 12 int errorFlag= true;12 int testStatus = true; 13 13 14 printPositiveTestHeader(std err,14 printPositiveTestHeader(stdout, 15 15 "psTrace functions", 16 " Testing psSetTraceLevel and psGetTraceLevel");16 "psSetTraceLevel() and psGetTraceLevel()"); 17 17 for (i=0;i<10;i++) { 18 18 psSetTraceLevel(".", i); … … 21 21 printf("ERROR: (.) expected trace level was %d, actual was %d\n", 22 22 i, lev); 23 errorFlag= false;23 testStatus = false; 24 24 } 25 25 } … … 32 32 printf("ERROR: (.NODE00) expected trace level was %d, actual was %d\n", 33 33 i, lev); 34 errorFlag= false;34 testStatus = false; 35 35 } 36 36 … … 39 39 printf("ERROR: (.) expected trace level was %d, actual was %d\n", 40 40 i, 3); 41 errorFlag= false;41 testStatus = false; 42 42 } 43 43 } … … 51 51 printf("ERROR: (.NODE00.NODE01) expected trace level was %d, actual was %d\n", 52 52 i, lev); 53 errorFlag= false;53 testStatus = false; 54 54 } 55 55 } 56 56 57 printFooter(std err,57 printFooter(stdout, 58 58 "psTrace functions", 59 59 "Testing psSetTraceLevel and psGetTraceLevel", 60 errorFlag);61 exit( 0);60 testStatus); 61 exit(!testStatus); 62 62 } -
trunk/psLib/test/sysUtils/tst_psTrace01.c
r555 r560 12 12 int successFlag = true; 13 13 14 printPositiveTestHeader(std err,14 printPositiveTestHeader(stdout, 15 15 "psTrace functions", 16 " TestingpsTraceReset()");16 "psTraceReset()"); 17 17 18 18 for (i=0;i<10;i++) { … … 21 21 22 22 lev = psGetTraceLevel("."); 23 if (lev != UNKNOWN_TRACE_LEVEL) {23 if (lev != DEFAULT_TRACE_LEVEL) { 24 24 printf("ERROR: expected trace level was %d, actual was %d\n", 25 25 i, lev); … … 32 32 psSetTraceLevel(".a.b.c", 2); 33 33 psTraceReset(); 34 if (( UNKNOWN_TRACE_LEVEL != psGetTraceLevel(".")) ||35 ( UNKNOWN_TRACE_LEVEL != psGetTraceLevel(".a")) ||36 ( UNKNOWN_TRACE_LEVEL != psGetTraceLevel(".a.b")) ||37 ( UNKNOWN_TRACE_LEVEL != psGetTraceLevel(".a.b.c"))) {34 if ((DEFAULT_TRACE_LEVEL != psGetTraceLevel(".")) || 35 (DEFAULT_TRACE_LEVEL != psGetTraceLevel(".a")) || 36 (DEFAULT_TRACE_LEVEL != psGetTraceLevel(".a.b")) || 37 (DEFAULT_TRACE_LEVEL != psGetTraceLevel(".a.b.c"))) { 38 38 printf("ERROR: trace levels were not reset properly\n"); 39 39 successFlag = false; 40 40 } 41 41 42 printFooter(std err,42 printFooter(stdout, 43 43 "psTrace functions", 44 " TestingpsTraceReset()",44 "psTraceReset()", 45 45 successFlag); 46 exit(0); 46 47 exit(!successFlag); 47 48 } -
trunk/psLib/test/sysUtils/tst_psTrace02.c
r555 r560 12 12 int lev = 0; 13 13 int errorFlag = 0; 14 15 printPositiveTestHeader(stdout, 16 "psTrace functions", 17 "psTrace()"); 14 18 15 19 psSetTraceLevel(".", 4); … … 35 39 0xbeefface); 36 40 41 printFooter(stdout, 42 "psTrace functions", 43 "psTrace()", 44 true); 45 37 46 exit(0); 38 47 } -
trunk/psLib/test/sysUtils/tst_psTrace03.c
r558 r560 9 9 main() 10 10 { 11 printPositiveTestHeader(stdout, 12 "psTrace functions", 13 "psTracePrintLevels()"); 14 11 15 psSetTraceLevel(".", 9); 12 16 … … 26 30 27 31 psPrintTraceLevels(); 32 33 printFooter(stdout, 34 "psTrace functions", 35 "psTracePrintLevels()", 36 true); 37 28 38 exit(0); 29 39 } -
trunk/psLib/test/sysUtils/verified/tst_psTrace00.stderr
r554 r560 1 /----------------------------- TESTPOINT --------------------------------\2 | TestFile: tst_psTrace00.c |3 | TestPoint: psTrace functions{Testing psSetTraceLevel and psGetTraceLevel} |4 | TestType: Positive |5 \------------------------------------------------------------------------/6 7 8 ---> TESTPOINT PASSED (psTrace functions{Testing psSetTraceLevel and psGetTraceLevel} | tst_psTrace00.c)9 -
trunk/psLib/test/sysUtils/verified/tst_psTrace00.stdout
r554 r560 1 /----------------------------- TESTPOINT --------------------------------\ 2 | TestFile: tst_psTrace00.c | 3 | TestPoint: psTrace functions{psSetTraceLevel() and psGetTraceLevel()} | 4 | TestType: Positive | 5 \------------------------------------------------------------------------/ 6 7 8 ---> TESTPOINT PASSED (psTrace functions{Testing psSetTraceLevel and psGetTraceLevel} | tst_psTrace00.c) 9 -
trunk/psLib/test/sysUtils/verified/tst_psTrace01.stderr
r554 r560 1 /----------------------------- TESTPOINT --------------------------------\2 | TestFile: tst_psTrace01.c |3 | TestPoint: psTrace functions{Testing psTraceReset()} |4 | TestType: Positive |5 \------------------------------------------------------------------------/6 7 8 ---> TESTPOINT PASSED (psTrace functions{Testing psTraceReset()} | tst_psTrace01.c)9 -
trunk/psLib/test/sysUtils/verified/tst_psTrace01.stdout
r554 r560 1 /----------------------------- TESTPOINT --------------------------------\ 2 | TestFile: tst_psTrace01.c | 3 | TestPoint: psTrace functions{psTraceReset()} | 4 | TestType: Positive | 5 \------------------------------------------------------------------------/ 6 7 8 ---> TESTPOINT PASSED (psTrace functions{psTraceReset()} | tst_psTrace01.c) 9 -
trunk/psLib/test/sysUtils/verified/tst_psTrace02.stdout
r554 r560 1 /----------------------------- TESTPOINT --------------------------------\ 2 | TestFile: tst_psTrace02.c | 3 | TestPoint: psTrace functions{psTrace()} | 4 | TestType: Positive | 5 \------------------------------------------------------------------------/ 6 1 7 (0) This message should be displayed (beefface) 2 8 (1) This message should be displayed (beefface) 3 9 (2) This message should be displayed (beefface) 10 11 ---> TESTPOINT PASSED (psTrace functions{psTrace()} | tst_psTrace02.c) 12 -
trunk/psLib/test/sysUtils/verified/tst_psTrace03.stdout
r558 r560 1 /----------------------------- TESTPOINT --------------------------------\ 2 | TestFile: tst_psTrace03.c | 3 | TestPoint: psTrace functions{psTracePrintLevels()} | 4 | TestType: Positive | 5 \------------------------------------------------------------------------/ 6 1 7 . 9 2 8 a 8 … … 10 16 b 3 11 17 c 5 18 19 ---> TESTPOINT PASSED (psTrace functions{psTracePrintLevels()} | tst_psTrace03.c) 20
Note:
See TracChangeset
for help on using the changeset viewer.
