Changeset 13614 for trunk/psLib/test/astro/tap_psTime_04.c
- Timestamp:
- Jun 4, 2007, 10:25:32 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/astro/tap_psTime_04.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astro/tap_psTime_04.c
r12415 r13614 18 18 * @author David Robbins, MHPCC 19 19 * 20 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $21 * @date $Date: 2007-0 3-13 00:23:20$20 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 21 * @date $Date: 2007-06-04 20:25:32 $ 22 22 * 23 23 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 34 34 psLogSetFormat("HLNM"); 35 35 psLogSetLevel(PS_LOG_INFO); 36 plan_tests(1 6);36 plan_tests(19); 37 37 38 38 … … 114 114 } 115 115 116 116 117 // testTideUT1Corr() 118 // Verify NULL return with NULL input 119 // XXX: Verify error 117 120 { 118 121 psMemId id = psMemGetId(); 119 psTime *tide = NULL; 122 psTime *empty = psTime_TideUT1Corr(NULL); 123 ok(empty == NULL, "psTime_TideUT1Corr() returned NULL for NULL input time"); 124 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 125 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 126 } 127 128 129 // testTideUT1Corr() 130 // 131 { 132 psMemId id = psMemGetId(); 120 133 psTime *noTide = psTimeAlloc(PS_TIME_UTC); 121 134 noTide->sec = 1049160600; 122 135 noTide->nsec = 0; 123 136 noTide->leapsecond = false; 124 // Following should generate error message 125 // XXX: We do not test error generation here 126 psTime *empty = empty = psTime_TideUT1Corr(tide); 127 ok(empty == NULL, "psTime_TideUT1Corr() returned NULL for NULL input time"); 128 129 empty = psTime_TideUT1Corr(noTide); 137 psTime *empty = psTime_TideUT1Corr(noTide); 130 138 is_long(empty->sec, 1049160599, "psTime_TideUT1Corr() returned correct ->sec"); 131 139 is_long(empty->nsec, 656981971, "psTime_TideUT1Corr() returned correct ->nsec"); 132 133 140 ok(p_psTimeFinalize(), "p_psTimeFinalize() successful"); 134 135 141 psFree(empty); 136 142 psFree(noTide); 137 143 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 144 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 138 145 } 139 146 }
Note:
See TracChangeset
for help on using the changeset viewer.
