Changeset 1732
- Timestamp:
- Sep 8, 2004, 12:09:07 PM (22 years ago)
- Location:
- trunk/psLib/test/sysUtils
- Files:
-
- 3 edited
-
tst_psTrace.c (modified) (13 diffs)
-
verified/tst_psTrace.stderr (modified) (3 diffs)
-
verified/tst_psTrace.stdout (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sysUtils/tst_psTrace.c
r1698 r1732 41 41 int lev = 0; 42 42 43 psTraceSetDestination(stderr); 44 43 45 for (i=0;i<10;i++) { 44 46 (void)psTraceSetLevel(".", i); 45 47 lev = psTraceGetLevel("."); 46 48 if (lev != i) { 47 printf("ERROR: (.) expected trace level was %d, actual was %d\n",48 i, lev);49 fprintf(stderr,"ERROR: (.) expected trace level was %d, actual was %d\n", 50 i, lev); 49 51 return 1; 50 52 } … … 56 58 lev = psTraceGetLevel(".NODE00"); 57 59 if (lev != i) { 58 printf("ERROR: (.NODE00) expected trace level was %d, actual was %d\n",59 i, lev);60 fprintf(stderr,"ERROR: (.NODE00) expected trace level was %d, actual was %d\n", 61 i, lev); 60 62 return 2; 61 63 } … … 63 65 lev = psTraceGetLevel("."); 64 66 if (lev != 3) { 65 printf("ERROR: (.) expected trace level was %d, actual was %d\n",66 i, 3);67 fprintf(stderr,"ERROR: (.) expected trace level was %d, actual was %d\n", 68 i, 3); 67 69 return 3; 68 70 } … … 75 77 lev = psTraceGetLevel(".NODE00.NODE01"); 76 78 if (lev != i) { 77 printf("ERROR: (.NODE00.NODE01) expected trace level was %d, actual was %d\n",78 i, lev);79 fprintf(stderr,"ERROR: (.NODE00.NODE01) expected trace level was %d, actual was %d\n", 80 i, lev); 79 81 return 4; 80 82 } … … 86 88 static int testTrace01(void) 87 89 { 90 psTraceSetDestination(stderr); 88 91 (void)psTraceSetLevel(".A.B.C.D.E", 5); 89 92 … … 95 98 static int testTrace02(void) 96 99 { 100 psTraceSetDestination(stderr); 97 101 psTraceSetLevel(".A.B", 2); 98 102 psTraceSetLevel(".A.B.C.D.E", 5); … … 108 112 int i = 0; 109 113 int lev = 0; 114 115 psTraceSetDestination(stderr); 110 116 111 117 for (i=0;i<10;i++) { … … 115 121 lev = psTraceGetLevel("."); 116 122 if (lev != PS_UNKNOWN_TRACE_LEVEL) { 117 printf("ERROR: expected trace level was %d, actual was %d\n",118 PS_UNKNOWN_TRACE_LEVEL, lev);123 fprintf(stderr,"ERROR: expected trace level was %d, actual was %d\n", 124 PS_UNKNOWN_TRACE_LEVEL, lev); 119 125 return 1; 120 126 } … … 128 134 (3 != psTraceGetLevel(".a.b")) || 129 135 (2 != psTraceGetLevel(".a.b.c"))) { 130 printf("ERROR: trace successFlag = false;levels were not settable?\n");136 fprintf(stderr,"ERROR: trace successFlag = false;levels were not settable?\n"); 131 137 return 2; 132 138 } … … 137 143 (PS_UNKNOWN_TRACE_LEVEL != psTraceGetLevel(".a.b")) || 138 144 (PS_UNKNOWN_TRACE_LEVEL != psTraceGetLevel(".a.b.c"))) { 139 printf("ERROR: trace levels were not reset properly\n");145 fprintf(stderr,"ERROR: trace levels were not reset properly\n"); 140 146 return 3; 141 147 } … … 161 167 psTraceSetDestination(fp); 162 168 163 printPositiveTestHeader(stdout,164 "psTrace functions",165 "psTrace()");166 167 169 (void)psTraceSetLevel(".", 4); 168 170 psTrace(".", 5, "(0) This message should not be displayed (%x)\n", … … 196 198 static int testTrace05(void) 197 199 { 200 psTraceSetDestination(stderr); 201 198 202 (void)psTraceSetLevel(".", 9); 199 203 … … 220 224 static int testTrace06(void) 221 225 { 226 psTraceSetDestination(stderr); 227 222 228 (void)psTraceSetLevel(".", 9); 223 229 -
trunk/psLib/test/sysUtils/verified/tst_psTrace.stderr
r1698 r1732 14 14 \**********************************************************************************/ 15 15 16 . 0 17 A 0 18 B 0 19 C 0 20 D 0 21 E 5 16 22 17 23 ---> TESTPOINT PASSED (psTrace{psTraceSetLevel(): set multiple components in one call} | tst_psTrace.c) … … 23 29 \**********************************************************************************/ 24 30 31 . 0 32 A 0 33 B 2 34 C 2 35 D 2 36 E 5 37 . 0 38 A 0 39 B 10 40 C 10 41 D 10 42 E 5 25 43 26 44 ---> TESTPOINT PASSED (psTrace{psTraceSetLevel(): test static inheritance} | tst_psTrace.c) … … 53 71 \**********************************************************************************/ 54 72 73 . 9 74 a 8 75 a 4 76 b 3 77 b 7 78 a 2 79 b 1 80 c 5 81 a 5 82 b 3 83 c 5 55 84 56 85 ---> TESTPOINT PASSED (psTrace{psTracePrintLevels()} | tst_psTrace.c) -
trunk/psLib/test/sysUtils/verified/tst_psTrace.stdout
r1698 r1732 1 . 02 A 03 B 04 C 05 D 06 E 57 . 08 A 09 B 210 C 211 D 212 E 513 . 014 A 015 B 1016 C 217 D 218 E 519 /***************************** TESTPOINT ******************************************\20 * TestFile: tst_psTrace.c *21 * TestPoint: psTrace functions{psTrace()} *22 * TestType: Positive *23 \**********************************************************************************/24 25 1 (0) This message should be displayed (beefface) 26 2 (1) This message should be displayed (beefface) 27 3 (2) This message should be displayed (beefface) 28 /***************************** TESTPOINT ******************************************\29 * TestFile: tst_psTrace.c *30 * TestPoint: psTrace functions{psTrace()} *31 * TestType: Positive *32 \**********************************************************************************/33 34 /***************************** TESTPOINT ******************************************\35 * TestFile: tst_psTrace.c *36 * TestPoint: psTrace functions{psTrace()} *37 * TestType: Positive *38 \**********************************************************************************/39 40 4 (0) This message should be displayed (beefface) 41 5 (1) This message should be displayed (beefface) 42 6 (2) This message should be displayed (beefface) 43 /***************************** TESTPOINT ******************************************\44 * TestFile: tst_psTrace.c *45 * TestPoint: psTrace functions{psTrace()} *46 * TestType: Positive *47 \**********************************************************************************/48 49 . 950 a 851 a 452 b 353 b 754 a 255 b 156 c 557 a 058 b 359 c 5
Note:
See TracChangeset
for help on using the changeset viewer.
