common/testerror.c
///////////////////////////////////////////////////////////////////////////////
// Filename: testerror.c
///////////////////////////////////////////////////////////////////////////////
// Purpose: tests class error
///////////////////////////////////////////////////////////////////////////////
// History:
// ========
//
// Date     Time     Name      Description   
// -------- -------- --------  ------------------------------------------------
// 96/02/06 00:09:17 muellerg: created
//
///////////////////////////////////////////////////////////////////////////////
// Feature test switches ///////////////////////////// Feature test switches //
    /* NONE */
// System headers /////////////////////////////////////////// System headers //
#include <stdlib.h>
#include <errno.h>
#include <iostream.h>
// Local headers ///////////////////////////////////////////// Local headers //
    /* NONE */
#include "../common.h"
// Macros /////////////////////////////////////////////////////////// Macros //
    /* NONE */
// File scope objects /////////////////////////////////// File scope objects //
    /* NONE */
// External variables, functions, and classes ///////////// External objects //
    /* NONE */
// Signal catching functions ///////////////////// Signal catching functions //
    /* NONE */
// Structures, unions, and class definitions /////////////////// Definitions //
    /* NONE */
// Functions and class implementation /// Functions and class implementation //
    /* NONE */
// Main /////////////////////////////////////////////////////////////// Main //
int 
main(int argc, char *argv[])
{
    error.set_program_name(argv[0]);
    errno=EPERM;
    error.system("system error test EPERM", errors::harmless);
    error.system(ENOENT, "system error test ENOENT", errors::harmless);
    error.warning("Test warning 1");
    error.warning("Test warning %d", 2);
    error.warning("Test warning %s %d", "three", 3);
    error.set_debug_level(errors::high);
    error.debug("debug test 1", errors::high);
    error.set_debug_level(errors::low);
    error.debug("debug test 2", errors::high);
    BUG("Bug test!");
    /* never reached */
    return(EXIT_SUCCESS);
}