/** @file  tst_psTime_04.c
 *
 *  @brief Test driver for psTime functions
 *
 *  This test driver contains the following tests for psTime:
 *      Test A - Initialize time
 *      Test B - Attempt to open non-existant time config file
 *      Test C - Attempt to open non-existant time data files
 *      Test D - Attempt to read incorrect number of files
 *      Test E - Attempt to read incorrect number of from values
 *      Test F - Attempt to read data file with typo in number
 *      Test G - Free data
 *
 *  @author  Ross Harman, MHPCC
 *  @author  Eric Van Alst, MHPCC
 *
 *  @version $Revision: 1.13 $  $Name: not supported by cvs2svn $
 *  @date  $Date: 2005-06-10 01:41:35 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
 *
 */
#include "config.h"

#include "pslib_strict.h"
#include "psTest.h"

static psS32 testTimeInit1(void);
static psS32 testTimeInit2(void);
static psS32 testTimeInit3(void);
static psS32 testTimeInit4(void);
static psS32 testTimeInit5(void);
static psS32 testTimeInit6(void);

testDescription tests[] = {
                              {testTimeInit1,000,"p_psTimeInit",0,false},
                              {testTimeInit2,000,"p_psTimeInit",0,false},
                              {testTimeInit3,000,"p_psTimeInit",0,false},
                              {testTimeInit4,000,"p_psTimeInit",0,false},
                              {testTimeInit5,000,"p_psTimeInit",0,false},
                              {testTimeInit6,000,"p_psTimeInit",0,false},
                              {NULL}
                          };

psS32 main(psS32 argc, char* argv[])
{
    if(!runTestSuite(stderr,"psTime",tests,argc,argv)) {
        return 1;
    }

    return 0;
}

psS32 testTimeInit1(void)
{
    // Test A - Initialize time
    psLibInit("psTime.config");
    psLibFinalize();

    return 0;
}

psS32 testTimeInit2(void)
{
    // Test B - Attempt to open non-existant time config file
    psLibInit("zzz");

    return 0;
}

psS32 testTimeInit3(void)
{
    // Test C - Attempt to open non-existant time data files
    psLibInit("test.psTime.config1");
    psLibFinalize();

    return 0;
}

psS32 testTimeInit4(void)
{
    // Test D - Attempt to read incorrect number of files
    psLibInit("test.psTime.config2");
    psLibFinalize();

    return 0;
}

psS32 testTimeInit5(void)
{
    // Test E - Attempt to read incorrect number of from values
    psLibInit("test.psTime.config3");
    psLibFinalize();

    return 0;
}

psS32 testTimeInit6(void)
{
    // Test F - Attempt to read data file with typo in number
    psLibInit("test.psTime.config4");
    psLibFinalize();

    return 0;
}

