IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1732


Ignore:
Timestamp:
Sep 8, 2004, 12:09:07 PM (22 years ago)
Author:
desonia
Message:

fixed destination problems in psTrace testing.

Location:
trunk/psLib/test/sysUtils
Files:
3 edited

Legend:

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

    r1698 r1732  
    4141    int lev = 0;
    4242
     43    psTraceSetDestination(stderr);
     44
    4345    for (i=0;i<10;i++) {
    4446        (void)psTraceSetLevel(".", i);
    4547        lev = psTraceGetLevel(".");
    4648        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);
    4951            return 1;
    5052        }
     
    5658        lev = psTraceGetLevel(".NODE00");
    5759        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);
    6062            return 2;
    6163        }
     
    6365        lev = psTraceGetLevel(".");
    6466        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);
    6769            return 3;
    6870        }
     
    7577        lev = psTraceGetLevel(".NODE00.NODE01");
    7678        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);
    7981            return 4;
    8082        }
     
    8688static int testTrace01(void)
    8789{
     90    psTraceSetDestination(stderr);
    8891    (void)psTraceSetLevel(".A.B.C.D.E", 5);
    8992
     
    9598static int testTrace02(void)
    9699{
     100    psTraceSetDestination(stderr);
    97101    psTraceSetLevel(".A.B", 2);
    98102    psTraceSetLevel(".A.B.C.D.E", 5);
     
    108112    int i = 0;
    109113    int lev = 0;
     114
     115    psTraceSetDestination(stderr);
    110116
    111117    for (i=0;i<10;i++) {
     
    115121        lev = psTraceGetLevel(".");
    116122        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);
    119125            return 1;
    120126        }
     
    128134            (3 != psTraceGetLevel(".a.b")) ||
    129135            (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");
    131137        return 2;
    132138    }
     
    137143            (PS_UNKNOWN_TRACE_LEVEL != psTraceGetLevel(".a.b")) ||
    138144            (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");
    140146        return 3;
    141147    }
     
    161167            psTraceSetDestination(fp);
    162168
    163         printPositiveTestHeader(stdout,
    164                                 "psTrace functions",
    165                                 "psTrace()");
    166 
    167169        (void)psTraceSetLevel(".", 4);
    168170        psTrace(".", 5, "(0) This message should not be displayed (%x)\n",
     
    196198static int testTrace05(void)
    197199{
     200    psTraceSetDestination(stderr);
     201
    198202    (void)psTraceSetLevel(".", 9);
    199203
     
    220224static int testTrace06(void)
    221225{
     226    psTraceSetDestination(stderr);
     227
    222228    (void)psTraceSetLevel(".", 9);
    223229
  • trunk/psLib/test/sysUtils/verified/tst_psTrace.stderr

    r1698 r1732  
    1414\**********************************************************************************/
    1515
     16.                    0
     17 A                   0
     18  B                  0
     19   C                 0
     20    D                0
     21     E               5
    1622
    1723---> TESTPOINT PASSED (psTrace{psTraceSetLevel(): set multiple components in one call} | tst_psTrace.c)
     
    2329\**********************************************************************************/
    2430
     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
    2543
    2644---> TESTPOINT PASSED (psTrace{psTraceSetLevel(): test static inheritance} | tst_psTrace.c)
     
    5371\**********************************************************************************/
    5472
     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
    5584
    5685---> TESTPOINT PASSED (psTrace{psTracePrintLevels()} | tst_psTrace.c)
  • trunk/psLib/test/sysUtils/verified/tst_psTrace.stdout

    r1698 r1732  
    1 .                    0
    2  A                   0
    3   B                  0
    4    C                 0
    5     D                0
    6      E               5
    7 .                    0
    8  A                   0
    9   B                  2
    10    C                 2
    11     D                2
    12      E               5
    13 .                    0
    14  A                   0
    15   B                  10
    16    C                 2
    17     D                2
    18      E               5
    19 /***************************** TESTPOINT ******************************************\
    20 *             TestFile: tst_psTrace.c                                              *
    21 *            TestPoint: psTrace functions{psTrace()}                               *
    22 *             TestType: Positive                                                   *
    23 \**********************************************************************************/
    24 
    251     (0) This message should be displayed (beefface)
    262     (1) This message should be displayed (beefface)
    273     (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 
    404     (0) This message should be displayed (beefface)
    415     (1) This message should be displayed (beefface)
    426     (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 .                    9
    50  a                   8
    51   a                  4
    52   b                  3
    53  b                   7
    54   a                  2
    55   b                  1
    56  c                   5
    57   a                  0
    58   b                  3
    59   c                  5
Note: See TracChangeset for help on using the changeset viewer.