Changeset 12607 for trunk/psLib/test/astro/tap_psTime_01.c
- Timestamp:
- Mar 27, 2007, 12:52:03 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/astro/tap_psTime_01.c (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astro/tap_psTime_01.c
r12412 r12607 23 23 * @author Eric Van Alst, MHPCC 24 24 * 25 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $26 * @date $Date: 2007-03- 13 00:01:37$25 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 26 * @date $Date: 2007-03-27 22:52:02 $ 27 27 * 28 28 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 187 187 psMemId id = psMemGetId(); 188 188 psF64 ut1Delta = psTimeGetUT1Delta(NULL, PS_IERS_B); 189 ok_double(ut1Delta, NAN, "psTimeGetUT1Delta(NULL, PS_IERS_B) returned NAN");189 is_double(ut1Delta, NAN, "psTimeGetUT1Delta(NULL, PS_IERS_B) returned NAN"); 190 190 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 191 191 } … … 200 200 time->leapsecond = false; 201 201 psF64 ut1Delta = psTimeGetUT1Delta(time, PS_IERS_B); 202 ok_double(ut1Delta, NAN, "psTimeGetUT1Delta() returned NAN for incorrect time");202 is_double(ut1Delta, NAN, "psTimeGetUT1Delta() returned NAN for incorrect time"); 203 203 psFree(time); 204 204 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); … … 214 214 time->leapsecond = false; 215 215 psF64 ut1Delta = psTimeGetUT1Delta(time, -100); 216 ok_double(ut1Delta, NAN, "psTimeGetUT1Delta(time, -100) returned NAN (incorrect bulletin)");216 is_double(ut1Delta, NAN, "psTimeGetUT1Delta(time, -100) returned NAN (incorrect bulletin)"); 217 217 psFree(time); 218 218 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); … … 229 229 psF64 ut1Delta = psTimeGetUT1Delta(time, PS_IERS_A); 230 230 231 ok_double_tol(ut1Delta, testTime1UT1DeltaBullA, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin A");231 is_double_tol(ut1Delta, testTime1UT1DeltaBullA, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin A"); 232 232 233 233 psFree(time); … … 244 244 psF64 ut1Delta = psTimeGetUT1Delta(time, PS_IERS_B); 245 245 246 ok_double_tol(ut1Delta, testTime1UT1DeltaBullB, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");246 is_double_tol(ut1Delta, testTime1UT1DeltaBullB, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B"); 247 247 248 248 psFree(time); … … 262 262 psF64 ut1Delta = psTimeGetUT1Delta(time,PS_IERS_A); 263 263 264 ok_double_tol(ut1Delta, testTime2UT1DeltaBullA, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");264 is_double_tol(ut1Delta, testTime2UT1DeltaBullA, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B"); 265 265 266 266 psFree(time); … … 280 280 psF64 ut1Delta = psTimeGetUT1Delta(time,PS_IERS_B); 281 281 282 ok_double_tol(ut1Delta, testTime2UT1DeltaBullB, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");282 is_double_tol(ut1Delta, testTime2UT1DeltaBullB, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B"); 283 283 284 284 psFree(time); … … 298 298 psF64 ut1Delta = psTimeGetUT1Delta(time,PS_IERS_A); 299 299 300 ok_double_tol(ut1Delta, testTime3UT1DeltaBullA, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");300 is_double_tol(ut1Delta, testTime3UT1DeltaBullA, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B"); 301 301 302 302 psFree(time); … … 315 315 psF64 ut1Delta = psTimeGetUT1Delta(time,PS_IERS_B); 316 316 317 ok_double_tol(ut1Delta, testTime3UT1DeltaBullB, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B");317 is_double_tol(ut1Delta, testTime3UT1DeltaBullB, ERROR_TOL, "psTimeGetUT1Delta() produced the correct result: bulletin B"); 318 318 319 319 psFree(time); … … 329 329 psMemId id = psMemGetId(); 330 330 psF64 mjd = psTimeToMJD(NULL); 331 ok_double(mjd, NAN, "psTimeToMJD(NULL) returned NULL");331 is_double(mjd, NAN, "psTimeToMJD(NULL) returned NULL"); 332 332 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 333 333 } … … 346 346 time->leapsecond = false; 347 347 psF64 mjd = psTimeToMJD(time); 348 ok_double(mjd, NAN, "psTimeToMJD() returned NAN for incorrect time");348 is_double(mjd, NAN, "psTimeToMJD() returned NAN for incorrect time"); 349 349 psFree(time); 350 350 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); … … 361 361 psF64 mjd = psTimeToMJD(time); 362 362 363 ok_double_tol(mjd, 53207.765929, ERROR_TOL, "psTimeToMJD() returned correct time after 1/1/1970 epoch");363 is_double_tol(mjd, 53207.765929, ERROR_TOL, "psTimeToMJD() returned correct time after 1/1/1970 epoch"); 364 364 365 365 psFree(time); … … 376 376 psF64 mjd = psTimeToMJD(time); 377 377 378 ok_double_tol(mjd, testTime4MJD, ERROR_TOL, "psTimeToMJD() returned correct time before 1/1/1970 epoch");378 is_double_tol(mjd, testTime4MJD, ERROR_TOL, "psTimeToMJD() returned correct time before 1/1/1970 epoch"); 379 379 380 380 psFree(time); … … 391 391 psF64 jd = psTimeToJD(NULL); 392 392 393 ok_double(jd, NAN, "psTimeToJD(NULL) returned NULL");393 is_double(jd, NAN, "psTimeToJD(NULL) returned NULL"); 394 394 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 395 395 } … … 407 407 psF64 jd = psTimeToJD(time); 408 408 409 ok_double(jd, NAN, "psTimeToJD() returned NAN for incorrect time");409 is_double(jd, NAN, "psTimeToJD() returned NAN for incorrect time"); 410 410 411 411 psFree(time); … … 423 423 psF64 jd = psTimeToJD(time); 424 424 425 ok_double_tol(jd, 2453208.265929, ERROR_TOL, "psTimeToJD() returned the correct time after 1/1/1970 epoch");425 is_double_tol(jd, 2453208.265929, ERROR_TOL, "psTimeToJD() returned the correct time after 1/1/1970 epoch"); 426 426 427 427 psFree(time); … … 439 439 psF64 jd = psTimeToJD(time); 440 440 441 ok_double_tol(jd, testTime4JD, ERROR_TOL, "psTimeToJD() returned the correct time before 1/1/1970 epoch");441 is_double_tol(jd, testTime4JD, ERROR_TOL, "psTimeToJD() returned the correct time before 1/1/1970 epoch"); 442 442 443 443 psFree(time); … … 528 528 char *timeStr = psTimeToISO(time); 529 529 530 ok_str(timeStr, testTime1Str, "psTimeToISO(time) returned correct time (no leapsecond)");530 is_str(timeStr, testTime1Str, "psTimeToISO(time) returned correct time (no leapsecond)"); 531 531 532 532 psFree(timeStr); … … 547 547 char *timeStr = psTimeToISO(time); 548 548 549 ok_str(timeStr, testTime1StrLeap, "psTimeToISO(time) returned correct time (with leapsecond)");549 is_str(timeStr, testTime1StrLeap, "psTimeToISO(time) returned correct time (with leapsecond)"); 550 550 551 551 psFree(timeStr);
Note:
See TracChangeset
for help on using the changeset viewer.
