IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 847


Ignore:
Timestamp:
Jun 3, 2004, 4:07:28 PM (22 years ago)
Author:
gusciora
Message:

...

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

Legend:

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

    r584 r847  
    11/*****************************************************************************
    2     This code tests whether a hash table be de-allocated successfully.
     2    This code will test whether a hash table can be de-allocated successfully.
    33 
    44    GUS: figure out how the memory leak detection stuff works, then put it
  • trunk/psLib/test/sysUtils/tst_psLogMsg00.c

    r584 r847  
    11/*****************************************************************************
    2     This code tests whether trace levels can be set successfully.
     2    This code will test whether trace levels can be set successfully.
     3    This code will test whether trace messages can be displayed with printf
     4    style string.
    35 *****************************************************************************/
    46#include <stdio.h>
    57#include "pslib.h"
    68#include "psTest.h"
     9
     10void myLogMsg(const char *name,
     11              int level,
     12              const char *fmt,
     13              ...)
     14{
     15    va_list ap;
     16
     17    // Test whether psVLogMsg() accept a va_list for output variables.
     18    va_start(ap, fmt);
     19    psVLogMsg(name, level, fmt, ap);
     20    va_end(ap);
     21}
    722
    823int main()
     
    1328    printPositiveTestHeader(stdout,
    1429                            "psLogMsg functions",
    15                             "default log levels");
     30                            "default log levels, printf-style strings");
    1631
    1732    // Send a log messages for levels 0:9.  Only the first four messages
     
    2540                "default log levels",
    2641                testStatus);
     42
     43
     44    // Test whether psVLogMsg() accept a va_list for output variables.
     45    printPositiveTestHeader(stdout,
     46                            "psLogMsg functions",
     47                            "default log levels, psVLogMsg()");
     48
     49    // Send a log messages for levels 0:9.  Only the first four messages
     50    // should actually be displayed.
     51    for (i=0;i<10;i++) {
     52        myLogMsg(__func__, i, "Hello World!  My level is %d\n", i);
     53    }
     54
     55    printFooter(stdout,
     56                "psLogMsg functions",
     57                "default log levels",
     58                testStatus);
    2759    return(!testStatus);
     60
     61
    2862}
     63
Note: See TracChangeset for help on using the changeset viewer.