IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1736


Ignore:
Timestamp:
Sep 8, 2004, 2:03:19 PM (22 years ago)
Author:
gusciora
Message:

...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/sysUtils/tst_psTrace.c

    r1732 r1736  
    1616static int testTrace04(void);
    1717static int testTrace05(void);
     18static int testTrace05a(void);
    1819static int testTrace06(void);
     20static int testTrace20(void);
    1921
    2022testDescription tests[] = {
     
    2527                              {testTrace04, 4, "psTrace()", 0, false},
    2628                              {testTrace05, 5, "psTracePrintLevels()", 0, false},
     29                              {testTrace05a, 5, "optional leading dot and psTracePrintLevels()", 0, false},
    2730                              {testTrace06, 6, "Testing psTraceReset", 0, false},
     31                              {testTrace20, 20, "Testing ", 0, false},
    2832                              {NULL}
    2933                          };
     
    215219    (void)psTraceSetLevel(".c.b", 3);
    216220    (void)psTraceSetLevel(".c.c", 5);
     221
     222    psTracePrintLevels();
     223
     224    return 0;
     225
     226}
     227
     228static 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);
    217245
    218246    psTracePrintLevels();
     
    261289}
    262290
     291static 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.