Changeset 2749 for trunk/psLib/test/astronomy
- Timestamp:
- Dec 17, 2004, 10:48:47 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/astronomy/tst_psTime_03.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astronomy/tst_psTime_03.c
r2725 r2749 5 5 * 6 6 * This test driver contains the following tests for psTime: 7 * Test A - Add two times 8 * Test B - Subtact two times 9 * Test C - Delta two times 10 * Test D - Free data 7 * 8 * Test A - Add two times 9 * Test B - Add two times with overflow in microseconds 10 * Test C - Subtact two times 11 * Test D - Subtact two times with underflow in microseconds 12 * Test E - Delta two times 13 * Test F - Delta two times with underflow in microseconds 14 * Test G - Add two times across leapsecond boundary 15 * Test H - Find number of leapseconds added between two times 16 * Test G - Free data 11 17 * 12 18 * @author Ross Harman, MHPCC 13 19 * 14 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-12-1 6 18:53:28$20 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 21 * @date $Date: 2004-12-17 20:48:47 $ 16 22 * 17 23 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 138 144 139 145 146 // Test H - Find number of leapseconds added between two times 147 printPositiveTestHeader(stdout, "psTime", "Test H - Find number of leapseconds added between two times"); 148 psS64 out = 0.0; 149 psTime *time8a = NULL; 150 psTime *time8b = NULL; 151 time8a = psTimeFromISOTime("2004-12-18T1:00:00.00"); 152 time8b = psTimeFromISOTime("1972-1-1T1:00:00.00"); 153 out = psTimeLeapseconds(time8a, time8b); 154 printf("%lld\n", out); 155 printFooter(stdout, "psTime", "Test H - Find number of leapseconds added between two times", true); 156 157 140 158 // Test G - Free data 141 printPositiveTestHeader(stdout, "psTime", "Test G- Free data");159 printPositiveTestHeader(stdout, "psTime", "Test I - Free data"); 142 160 psLibFinalize(); 143 161 psFree(time1a); … … 156 174 psFree(time7a); 157 175 psFree(timeOut7); 176 psFree(time8a); 177 psFree(time8b); 158 178 if (psMemCheckLeaks(0, NULL, stdout,false)) { 159 179 psError(PS_ERR_UNKNOWN,true,"Memory leaks detected."); … … 165 185 printf("ERROR: Found %d bad memory blocks\n", nBad); 166 186 } 167 printFooter(stdout, "psTime", "Test G- Free data", true);187 printFooter(stdout, "psTime", "Test I - Free data", true); 168 188 return 0; 169 189 }
Note:
See TracChangeset
for help on using the changeset viewer.
