IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 22, 2004, 9:46:24 AM (22 years ago)
Author:
harman
Message:

Added more functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/astronomy/tst_psTime_01.c

    r1256 r1258  
    2121 *  @author  Ross Harman, MHPCC
    2222 *
    23  *  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
    24  *  @date  $Date: 2004-07-22 01:03:18 $
     23 *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
     24 *  @date  $Date: 2004-07-22 19:45:58 $
    2525 *
    2626 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3030#include "pslib.h"
    3131#include "psTest.h"
     32#include <string.h>
    3233
    3334int main(int argc, char* argv[])
     
    3536    psTime time;
    3637    psTime testTime;
     38    char *testString = "2004/07/21,18:22:24.272";
    3739
    3840    // Test time was taken at July 21, 2004 at 18:22:24.272044
     
    4951    //Test B - Print test time
    5052    printPositiveTestHeader(stdout,"psTime", "Print test time");
    51     printf("Test time: July 21, 2004 at 18:22:24.272044\n");
    5253    printf("Test time: Seconds = %ld Microseconds = %ld\n", (long)testTime.tv_sec, (long)testTime.tv_usec);
    5354    printFooter(stdout, "psTime", "Print test time", true);
     
    5859    char *isoString;
    5960    isoString = psTimeToISO(testTime);
    60     printf("ISO = %s\n", isoString);
     61    if(strncmp(isoString, testString, 256)) {
     62        printf("ERROR - ISO string incorrect\n");
     63        printf("Expected: %s\n", testString);
     64        printf("Returned: %s\n", isoString);
     65    }
    6166    printFooter(stdout, "psTime", "Convert psTime to ISO time", true);
    6267
Note: See TracChangeset for help on using the changeset viewer.