Changeset 6036 for trunk/psLib/test/astro/tst_psTime_04.c
- Timestamp:
- Jan 18, 2006, 10:59:32 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/astro/tst_psTime_04.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astro/tst_psTime_04.c
r5216 r6036 11 11 * Test F - Attempt to read data file with typo in number 12 12 * Test G - Free data 13 * Test H - Attempt to use all timer functions 14 * Test I - Tidal Corrections to UT1-UTC 13 15 * 14 16 * @author Ross Harman, MHPCC 15 17 * @author Eric Van Alst, MHPCC 18 * @author David Robbins, MHPCC 16 19 * 17 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $18 * @date $Date: 200 5-10-01 02:22:20$20 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 21 * @date $Date: 2006-01-18 20:59:32 $ 19 22 * 20 23 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 33 36 static psS32 testTimeInit6(void); 34 37 static psS32 testTimer1(void); 38 static psS32 testTideUT1Corr(void); 35 39 36 40 testDescription tests[] = { … … 42 46 {testTimeInit6,-6,"p_psTimeInit",0,false}, 43 47 {testTimer1,-7,"psTimer",0,false}, 48 {testTideUT1Corr,-8,"psTime_TideUT1Corr",0,false}, 44 49 {NULL} 45 50 }; … … 136 141 } 137 142 143 psS32 testTideUT1Corr(void) 144 { 145 psTime *empty = NULL; 146 psTime *tide = NULL; 147 psTime *noTide = psTimeAlloc(PS_TIME_UTC); 148 noTide->sec = 1049160600; 149 noTide->nsec = 0; 150 noTide->leapsecond = false; 151 152 empty = psTime_TideUT1Corr(tide); 153 if (empty != NULL) { 154 psError(PS_ERR_BAD_PARAMETER_NULL, false, 155 "psTime_TideUT1Corr failed to return NULL for NULL input time.\n"); 156 return 1; 157 } 158 159 empty = psTime_TideUT1Corr(noTide); 160 if (empty->sec != 1049160599 || empty->nsec != 656982272) { 161 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 162 "psTime_TideUT1Corr failed to return correct values.\n"); 163 printf("\nsec = %ld, nsec = %u\n", empty->sec, empty->nsec); 164 return 2; 165 } 166 167 if (!p_psTimeFinalize()) { 168 return 3; 169 } 170 171 psFree(empty); 172 psFree(noTide); 173 174 return 0; 175 } 176
Note:
See TracChangeset
for help on using the changeset viewer.
