Changeset 1736
- Timestamp:
- Sep 8, 2004, 2:03:19 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/sysUtils/tst_psTrace.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/sysUtils/tst_psTrace.c
r1732 r1736 16 16 static int testTrace04(void); 17 17 static int testTrace05(void); 18 static int testTrace05a(void); 18 19 static int testTrace06(void); 20 static int testTrace20(void); 19 21 20 22 testDescription tests[] = { … … 25 27 {testTrace04, 4, "psTrace()", 0, false}, 26 28 {testTrace05, 5, "psTracePrintLevels()", 0, false}, 29 {testTrace05a, 5, "optional leading dot and psTracePrintLevels()", 0, false}, 27 30 {testTrace06, 6, "Testing psTraceReset", 0, false}, 31 {testTrace20, 20, "Testing ", 0, false}, 28 32 {NULL} 29 33 }; … … 215 219 (void)psTraceSetLevel(".c.b", 3); 216 220 (void)psTraceSetLevel(".c.c", 5); 221 222 psTracePrintLevels(); 223 224 return 0; 225 226 } 227 228 static int testTrace05a(void) 229 { 230 (void)psTraceSetLevel(".", 9); 231 232 (void)psTraceSetLevel("a", 8); 233 (void)psTraceSetLevel("b", 7); 234 (void)psTraceSetLevel("c", 5); 235 236 (void)psTraceSetLevel("a.a", 4); 237 (void)psTraceSetLevel("a.b", 3); 238 239 (void)psTraceSetLevel("b.a", 2); 240 (void)psTraceSetLevel("b.b", 1); 241 242 (void)psTraceSetLevel("c.a", 0); 243 (void)psTraceSetLevel("c.b", 3); 244 (void)psTraceSetLevel("c.c", 5); 217 245 218 246 psTracePrintLevels(); … … 261 289 } 262 290 291 static int testTrace20(void) 292 { 293 (void)psTraceSetLevel(".", 9); 294 295 (void)psTraceSetLevel(".a", 8); 296 (void)psTraceSetLevel(".b", 7); 297 (void)psTraceSetLevel(".c", 5); 298 299 (void)psTraceSetLevel(".a.a", 4); 300 (void)psTraceSetLevel(".a.b", 3); 301 302 (void)psTraceSetLevel(".b.a", 2); 303 (void)psTraceSetLevel(".b.b", 1); 304 305 (void)psTraceSetLevel(".c.a", 0); 306 (void)psTraceSetLevel(".c.b", 3); 307 (void)psTraceSetLevel(".c.c", 5); 308 309 if ((psTraceGetLevel(".")!=PS_UNKNOWN_TRACE_LEVEL) || 310 (psTraceGetLevel("a")!=PS_UNKNOWN_TRACE_LEVEL) || 311 (psTraceGetLevel("b")!=PS_UNKNOWN_TRACE_LEVEL) || 312 (psTraceGetLevel("c")!=PS_UNKNOWN_TRACE_LEVEL) || 313 (psTraceGetLevel("a.a")!=PS_UNKNOWN_TRACE_LEVEL) || 314 (psTraceGetLevel("a.b")!=PS_UNKNOWN_TRACE_LEVEL) || 315 (psTraceGetLevel("b.a")!=PS_UNKNOWN_TRACE_LEVEL) || 316 (psTraceGetLevel("b.b")!=PS_UNKNOWN_TRACE_LEVEL) || 317 (psTraceGetLevel("c.a")!=PS_UNKNOWN_TRACE_LEVEL) || 318 (psTraceGetLevel("c.b")!=PS_UNKNOWN_TRACE_LEVEL) || 319 (psTraceGetLevel("c.c")!=PS_UNKNOWN_TRACE_LEVEL)) { 320 return 1; 321 } 322 323 return 0; 324 } 325
Note:
See TracChangeset
for help on using the changeset viewer.
