Changeset 13623 for trunk/psLib/test/astro/tap_psEarthOrientation_motion.c
- Timestamp:
- Jun 4, 2007, 3:10:22 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astro/tap_psEarthOrientation_motion.c
r12607 r13623 11 11 * 12 12 */ 13 14 13 #include <pslib.h> 15 14 #include <string.h> 16 17 15 #include "tap.h" 18 16 #include "pstap.h" … … 22 20 static void testSphereRots(void); 23 21 static void testSpherePrecess(void); 24 25 22 #define MJD_1900 15021.0 // Modified Julian Day 1/1/1900 00:00:00 26 23 #define MJD_2100 88069.0 // Modified Julian Day 1/1/2100 00:00:00 … … 30 27 psLogSetFormat("HLNM"); 31 28 psLogSetLevel(PS_LOG_INFO); 32 plan_tests(48); 33 34 // diag("Tests for psEarthOrientation Motion Functions"); 35 29 plan_tests(78); 30 31 // Tests for psEarthOrientation Motion Functions 36 32 // Initialize library internal structures 37 33 psLibInit("pslib.config"); … … 42 38 testSpherePrecess(); 43 39 44 // Cleanup library45 40 psLibFinalize(); 46 47 41 done(); 48 42 } … … 50 44 void testPrecessionModel(void) 51 45 { 52 // diag(" >>>Test 1: psEOC_PrecessionModel"); 46 // psEOC_PrecessionModel 53 47 54 48 psEarthPole *ep = NULL; 55 49 psTime *testTime = NULL; 56 50 51 57 52 //Test for psEarthPoleAlloc 58 53 //Return properly allocated psEarthPole 59 54 { 55 psMemId id = psMemGetId(); 60 56 ep = psEarthPoleAlloc(); 61 ok( ep != NULL, 62 "psEarthPoleAlloc: return properly allocated psEarthPole."); 57 ok( ep != NULL, "psEarthPoleAlloc: return properly allocated psEarthPole."); 63 58 psFree(ep); 64 59 ep = NULL; 65 } 60 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 61 } 62 63 66 64 //Tests for psEOC_PrecessionModel 67 65 //Return NULL for NULL time input. 68 66 { 67 psMemId id = psMemGetId(); 69 68 ep = psEOC_PrecessionModel(NULL); 70 ok( ep == NULL, 71 "psEOC_PrecessionModel: return NULL for NULL time input."); 72 } 69 ok( ep == NULL, "psEOC_PrecessionModel: return NULL for NULL time input."); 70 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 71 } 72 73 73 74 //Return NULL for UT1 time input. 74 75 { 76 psMemId id = psMemGetId(); 75 77 testTime = psTimeAlloc(PS_TIME_UT1); 76 78 ep = psEOC_PrecessionModel(testTime); 77 ok( ep == NULL, 78 "psEOC_PrecessionModel: return NULL for UT1 time input."); 79 } 79 ok( ep == NULL, "psEOC_PrecessionModel: return NULL for UT1 time input."); 80 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 81 } 82 83 80 84 //Return NULL for invalid time input. 81 85 { 86 psMemId id = psMemGetId(); 82 87 psFree(testTime); 83 88 testTime = psTimeAlloc(PS_TIME_UTC); … … 87 92 "psEOC_PrecessionModel: return NULL for invalid time input."); 88 93 testTime->nsec = 0; 89 } 94 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 95 } 96 97 90 98 //Return NULL for failed eoc init - missing file 91 99 //printf("\n filename = '%s' \n", p_psGetConfigFileName()); … … 93 101 //to define where the real pslib config is. 94 102 { 103 psMemId id = psMemGetId(); 95 104 testTime->sec = 1049160600; 96 105 testTime->nsec = 0; … … 103 112 rename("../../etc/pslib/pslib_config.bak", "../../etc/pslib/pslib.config"); 104 113 skip_end(); 105 } 114 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 115 } 116 106 117 107 118 //Return valid EarthPole for valid time input 108 119 { 120 psMemId id = psMemGetId(); 109 121 double x, y, s; 110 122 x = 2.857175590089105e-4; … … 121 133 "psEOC_PrecessionModel: return valid EarthPole for valid inputs (s)."); 122 134 skip_end(); 135 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 123 136 } 124 137 … … 147 160 void testPolarMotion(void) 148 161 { 149 // diag(" >>>Test 2: psEOC_GetPolarMotion "); 162 // psEOC_GetPolarMotion() 150 163 151 164 psTime *in = psTimeAlloc(PS_TIME_UTC); … … 155 168 psEarthPole *polarMotion = NULL; 156 169 170 157 171 //Tests for psEOC_GetPolarMotion 158 172 //Return NULL for NULL time input. 159 173 { 174 psMemId id = psMemGetId(); 160 175 polarMotion = psEOC_GetPolarMotion(NULL, PS_IERS_B); 161 ok( polarMotion == NULL, 162 "psEOC_GetPolarMotion: return NULL for NULL time input."); 163 } 176 ok( polarMotion == NULL, "psEOC_GetPolarMotion: return NULL for NULL time input."); 177 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 178 } 179 180 164 181 //Return NULL for invalid IERS table input 165 182 { 183 psMemId id = psMemGetId(); 166 184 polarMotion = psEOC_GetPolarMotion(NULL, PS_IERS_B+1); 167 ok( polarMotion == NULL, 168 "psEOC_GetPolarMotion: return NULL for invalid IERS table input."); 169 } 185 ok( polarMotion == NULL, "psEOC_GetPolarMotion: return NULL for invalid IERS table input."); 186 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 187 } 188 189 170 190 //Return NULL for invalid time input. 171 191 { 192 psMemId id = psMemGetId(); 172 193 in->nsec = 2e9; 173 194 polarMotion = psEOC_GetPolarMotion(in, PS_IERS_B); 174 ok( polarMotion == NULL, 175 "psEOC_GetPolarMotion: return NULL for invalid time input."); 195 ok( polarMotion == NULL, "psEOC_GetPolarMotion: return NULL for invalid time input."); 176 196 in->nsec = 0; 177 } 197 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 198 } 199 200 178 201 //Return NULL for failed eoc init - missing file 179 202 //XXX: Use the PS_CONFIG_FILE_DEFAULT macro, or PS_CONFIG_FILE environment variable 180 203 //to define where the real pslib config is. 181 204 { 205 psMemId id = psMemGetId(); 182 206 p_psEOCFinalize(); 183 207 skip_start(rename("../../etc/pslib/pslib.config", "../../etc/pslib/pslib_config.bak"), 184 208 1, "Skipping 1 tests because file rename failed!"); 185 209 polarMotion = psEOC_GetPolarMotion(in, PS_IERS_B); 186 ok( polarMotion == NULL, 187 "psEOC_GetPolarMotion: return NULL for failed eoc init."); 210 ok( polarMotion == NULL, "psEOC_GetPolarMotion: return NULL for failed eoc init."); 188 211 rename("../../etc/pslib/pslib_config.bak", "../../etc/pslib/pslib.config"); 189 212 skip_end(); 190 } 213 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 214 } 215 216 191 217 //Return valid EarthPole for valid time input - IERS B 192 218 { 219 psMemId id = psMemGetId(); 193 220 double x, y, s; 194 221 x = -6.454389659777e-07; … … 199 226 "Skipping 3 tests because psEarthPole is NULL!"); 200 227 is_double_tol(polarMotion->x, x, 0.1, 201 "psEOC_GetPolarMotion: return valid EarthPole for valid inputs "228 "psEOC_GetPolarMotion: return valid EarthPole for valid inputs " 202 229 "(x) - IERS B."); 203 230 is_double_tol(polarMotion->y, y, 0.1, 204 "psEOC_GetPolarMotion: return valid EarthPole for valid inputs "231 "psEOC_GetPolarMotion: return valid EarthPole for valid inputs " 205 232 "(y) - IERS B."); 206 233 is_double_tol(polarMotion->s, s, 0.1, 207 "psEOC_GetPolarMotion: return valid EarthPole for valid inputs "234 "psEOC_GetPolarMotion: return valid EarthPole for valid inputs " 208 235 "(s) - IERS B."); 209 236 skip_end(); 210 237 psFree(polarMotion); 211 } 238 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 239 } 240 241 212 242 //Return valid EarthPole for valid time input - IERS A 213 243 { 244 psMemId id = psMemGetId(); 214 245 double x, y, s; 215 246 x = -6.45381397904e-07; … … 220 251 "Skipping 3 tests because psEarthPole is NULL!"); 221 252 is_double_tol(polarMotion->x, x, 0.1, 222 "psEOC_GetPolarMotion: return valid EarthPole for valid inputs "253 "psEOC_GetPolarMotion: return valid EarthPole for valid inputs " 223 254 "(x) - IERS A."); 224 255 is_double_tol(polarMotion->y, y, 0.1, 225 "psEOC_GetPolarMotion: return valid EarthPole for valid inputs "256 "psEOC_GetPolarMotion: return valid EarthPole for valid inputs " 226 257 "(y) - IERS A."); 227 258 is_double_tol(polarMotion->s, s, 0.1, 228 "psEOC_GetPolarMotion: return valid EarthPole for valid inputs "259 "psEOC_GetPolarMotion: return valid EarthPole for valid inputs " 229 260 "(s) - IERS A."); 230 261 skip_end(); 231 262 psFree(polarMotion); 232 } 263 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 264 } 265 266 233 267 //Return valid EarthPole for valid time input - IERS A 234 268 { 269 psMemId id = psMemGetId(); 235 270 psTime *firstTime = psTimeFromMJD(41684.50); 236 271 polarMotion = psEOC_GetPolarMotion(firstTime, PS_IERS_B); 237 272 ok( polarMotion != NULL, 238 "psEOC_GetPolarMotion: return valid EarthPole for valid inputs.");273 "psEOC_GetPolarMotion: return valid EarthPole for valid inputs."); 239 274 psFree(firstTime); 275 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 240 276 } 241 277 … … 264 300 void testSphereRots(void) 265 301 { 266 // diag(" >>>Test 3: psSphereRot Functions"); 302 // psSphereRot Functions 267 303 psSphereRot *out = NULL; 268 304 psEarthPole *in = NULL; … … 276 312 //Return NULL for NULL earthPole input 277 313 { 314 psMemId id = psMemGetId(); 278 315 out = psSphereRot_CEOtoGCRS(in); 279 ok( out == NULL, 280 "psSphereRot_CEOtoGCRS: return NULL for NULL earthPole input."); 316 ok( out == NULL, "psSphereRot_CEOtoGCRS: return NULL for NULL earthPole input."); 281 317 in = psEarthPoleAlloc(); 282 } 318 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 319 } 320 321 283 322 in->x = 2.857175590089105e-4; 284 323 in->y = 2.3968739377734732e-5; … … 286 325 //Return correct psSphereRot for valid input 287 326 { 327 psMemId id = psMemGetId(); 288 328 out = psSphereRot_CEOtoGCRS(in); 289 329 skip_start( out == NULL, 4, 290 330 "Skipping 4 tests because psSphereRot output is NULL!"); 291 331 is_double_tol( out->q0, q0, 0.0001, 292 "psSphereRot_CEOtoGCRS: return correct psSphereRot for valid input (q0).");332 "psSphereRot_CEOtoGCRS: return correct psSphereRot for valid input (q0)."); 293 333 is_double_tol( out->q1, q1, 0.0001, 294 "psSphereRot_CEOtoGCRS: return correct psSphereRot for valid input (q1).");334 "psSphereRot_CEOtoGCRS: return correct psSphereRot for valid input (q1)."); 295 335 is_double_tol( out->q2, q2, 0.0001, 296 "psSphereRot_CEOtoGCRS: return correct psSphereRot for valid input (q2).");336 "psSphereRot_CEOtoGCRS: return correct psSphereRot for valid input (q2)."); 297 337 is_double_tol( out->q3, -q3, 0.0001, 298 "psSphereRot_CEOtoGCRS: return correct psSphereRot for valid input (q3)."); 299 skip_end(); 300 } 338 "psSphereRot_CEOtoGCRS: return correct psSphereRot for valid input (q3)."); 339 skip_end(); 340 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 341 } 342 301 343 302 344 //Tests for psSphereRot_TEOtoCEO … … 311 353 //Return NULL for NULL time input 312 354 { 355 psMemId id = psMemGetId(); 313 356 out = psSphereRot_TEOtoCEO(NULL, NULL); 314 ok( out == NULL, 315 "psSphereRot_TEOtoCEO: return NULL for NULL time input."); 316 } 357 ok( out == NULL, "psSphereRot_TEOtoCEO: return NULL for NULL time input."); 358 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 359 } 360 361 317 362 //Return NULL for invalid time input - large nsec, UTC time type 318 363 { 364 psMemId id = psMemGetId(); 319 365 time2->nsec = 3e9; 320 366 out = psSphereRot_TEOtoCEO(time2, NULL); 321 ok( out == NULL, 322 "psSphereRot_TEOtoCEO: return NULL for invalid time input."); 323 } 367 ok( out == NULL, "psSphereRot_TEOtoCEO: return NULL for invalid time input."); 368 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 369 } 370 371 324 372 //Return NULL for invalid time input - UT1 time type, large nsec 325 373 { 374 psMemId id = psMemGetId(); 326 375 psFree(time2); 327 376 time2 = psTimeAlloc(PS_TIME_UT1); … … 329 378 temp->s = 1.0; 330 379 out = psSphereRot_TEOtoCEO(time2, temp); 331 ok( out == NULL, 332 "psSphereRot_TEOtoCEO: return NULL for invalid time input."); 333 } 380 ok( out == NULL, "psSphereRot_TEOtoCEO: return NULL for invalid time input."); 381 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 382 } 383 384 334 385 //Return NULL for invalid earthPole input 335 386 { 387 psMemId id = psMemGetId(); 336 388 time2->nsec = 0; 337 389 psEarthPole *temp = psEarthPoleAlloc(); 338 390 temp->s = -2.0; 339 391 out = psSphereRot_TEOtoCEO(time2, temp); 340 ok( out == NULL, 341 "psSphereRot_TEOtoCEO: return NULL for invalid earthPole input."); 342 } 392 ok( out == NULL, "psSphereRot_TEOtoCEO: return NULL for invalid earthPole input."); 393 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 394 } 395 396 343 397 //Return correct psSphereRot for valid inputs 344 398 double x, y, z; … … 347 401 z = 0.7496183628158023; 348 402 { 403 psMemId id = psMemGetId(); 349 404 psEarthPole *polarTideCorr = psEOC_PolarTideCorr(time); 350 405 out = psSphereRot_TEOtoCEO(time, polarTideCorr); … … 356 411 psCube *cube = psSphereToCube(result); 357 412 is_double_tol( cube->x, x, 0.0001, 358 "psSphereRot_TEOtoCEO: return NULL for NULL time input. (x)");413 "psSphereRot_TEOtoCEO: return NULL for NULL time input. (x)"); 359 414 is_double_tol( cube->y, y, 0.0001, 360 "psSphereRot_TEOtoCEO: return NULL for NULL time input. (y)"); 361 is_double_tol( cube->z, z, 0.0001, 362 "psSphereRot_TEOtoCEO: return NULL for NULL time input. (z)"); 415 "psSphereRot_TEOtoCEO: return NULL for NULL time input. (y)"); 416 is_double_tol( cube->z, z, 0.0001, "psSphereRot_TEOtoCEO: return NULL for NULL time input. (z)"); 363 417 psFree(earthRot); 364 418 psFree(result); … … 367 421 skip_end(); 368 422 psFree(polarTideCorr); 369 } 423 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 424 } 425 370 426 371 427 //Tests for psSphereRot_ITRStoTEO 372 428 //Return NULL for NULL earthPole input 373 429 { 430 psMemId id = psMemGetId(); 374 431 psFree(out); 375 432 out = psSphereRot_ITRStoTEO(NULL); … … 377 434 "psSphereRot_ITRStoTEO: return NULL for NULL earthPole input."); 378 435 in = psEarthPoleAlloc(); 379 } 436 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 437 } 438 439 380 440 //Return correct psSphereRot for valid input 381 441 { 442 psMemId id = psMemGetId(); 382 443 q0 = -1.0567571848664005e-6; 383 444 q1 = 3.218036562931509e-7; … … 391 452 "Skipping 4 tests because psSphereRot output is NULL!"); 392 453 is_double_tol( out->q0, q0, 0.0001, 393 "psSphereRot_ITRStoTEO: return correct psSphereRot for valid input (q0).");454 "psSphereRot_ITRStoTEO: return correct psSphereRot for valid input (q0)."); 394 455 is_double_tol( out->q1, q1, 0.0001, 395 "psSphereRot_ITRStoTEO: return correct psSphereRot for valid input (q1).");456 "psSphereRot_ITRStoTEO: return correct psSphereRot for valid input (q1)."); 396 457 is_double_tol( out->q2, q2, 0.0001, 397 "psSphereRot_ITRStoTEO: return correct psSphereRot for valid input (q2).");458 "psSphereRot_ITRStoTEO: return correct psSphereRot for valid input (q2)."); 398 459 is_double_tol( out->q3, q3, 0.0001, 399 "psSphereRot_ITRStoTEO: return correct psSphereRot for valid input (q3)."); 400 skip_end(); 460 "psSphereRot_ITRStoTEO: return correct psSphereRot for valid input (q3)."); 461 skip_end(); 462 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 401 463 } 402 464 … … 428 490 void testSpherePrecess(void) 429 491 { 430 // diag(" >>>Test 4: psSpherePrecess"); 492 // psSpherePrecess 431 493 psSphereRot *rot = NULL; 432 494 psTime *fromTime = NULL; … … 435 497 psSphere* outputCoord = NULL; 436 498 499 437 500 //Return NULL for NULL time inputs 438 501 { 502 psMemId id = psMemGetId(); 439 503 rot = psSpherePrecess(fromTime, toTime, PS_PRECESS_ROUGH); 440 ok( rot == NULL, 441 "psSpherePrecess: return NULL for NULL time inputs."); 442 } 504 ok( rot == NULL, "psSpherePrecess: return NULL for NULL time inputs."); 505 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 506 } 507 508 443 509 //Return NULL for invalid mode input 444 510 { 511 psMemId id = psMemGetId(); 445 512 fromTime = psTimeFromMJD(MJD_2100); 446 513 toTime = psTimeFromMJD(MJD_1900); 447 514 rot = psSpherePrecess(fromTime, toTime, -1); 448 ok( rot == NULL, 449 "psSpherePrecess: return NULL for invalid mode input."); 450 } 515 ok( rot == NULL, "psSpherePrecess: return NULL for invalid mode input."); 516 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 517 } 518 519 451 520 //Return correct psSphereRot for valid inputs, mode = ROUGH 452 521 { 522 psMemId id = psMemGetId(); 453 523 inputCoord->r = SPHERE_PRECESS_TP1_R; 454 524 inputCoord->d = SPHERE_PRECESS_TP1_D; … … 463 533 "Skipping 2 tests because psSphereRot output is NULL!"); 464 534 is_double_tol( outputCoord->r, SPHERE_PRECESS_TP1_EXPECT_R, ERROR_TOL, 465 "psSpherePrecess: return correct psSphereRot for valid"535 "psSpherePrecess: return correct psSphereRot for valid" 466 536 " inputs and PS_PRECESS_ROUGH mode. (r)"); 467 537 is_double_tol( outputCoord->d, SPHERE_PRECESS_TP1_EXPECT_D, ERROR_TOL, 468 "psSpherePrecess: return correct psSphereRot for valid"538 "psSpherePrecess: return correct psSphereRot for valid" 469 539 " inputs and PS_PRECESS_ROUGH mode. (d)"); 470 540 skip_end(); 471 541 psFree(outputCoord); 472 542 psFree(rot); 473 } 543 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 544 } 545 546 474 547 //Return correct psSphereRot for valid inputs, mode = ROUGH 475 548 { 549 psMemId id = psMemGetId(); 476 550 inputCoord->r = SPHERE_PRECESS_TP2_R; 477 551 inputCoord->d = SPHERE_PRECESS_TP2_D; … … 486 560 "Skipping 2 tests because psSphereRot output is NULL!"); 487 561 is_double_tol( outputCoord->r, SPHERE_PRECESS_TP2_EXPECT_R, ERROR_TOL, 488 "psSpherePrecess: return correct psSphereRot for valid"562 "psSpherePrecess: return correct psSphereRot for valid" 489 563 " inputs and PS_PRECESS_ROUGH mode. (r)"); 490 564 is_double_tol( outputCoord->d, SPHERE_PRECESS_TP2_EXPECT_D, ERROR_TOL, 491 "psSpherePrecess: return correct psSphereRot for valid"565 "psSpherePrecess: return correct psSphereRot for valid" 492 566 " inputs and PS_PRECESS_ROUGH mode. (d)"); 493 567 skip_end(); 494 568 psFree(outputCoord); 495 569 psFree(rot); 496 } 570 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 571 } 572 573 497 574 //Return correct psSphereRot for valid inputs, mode = ROUGH 498 575 { 576 psMemId id = psMemGetId(); 499 577 inputCoord->r = SPHERE_PRECESS_TP3_R; 500 578 inputCoord->d = SPHERE_PRECESS_TP3_D; … … 509 587 "Skipping 2 tests because psSphereRot output is NULL!"); 510 588 is_double_tol( outputCoord->r, SPHERE_PRECESS_TP3_EXPECT_R, ERROR_TOL, 511 "psSpherePrecess: return correct psSphereRot for valid"589 "psSpherePrecess: return correct psSphereRot for valid" 512 590 " inputs and PS_PRECESS_ROUGH mode. (r)"); 513 591 is_double_tol( outputCoord->d, SPHERE_PRECESS_TP3_EXPECT_D, ERROR_TOL, 514 "psSpherePrecess: return correct psSphereRot for valid"592 "psSpherePrecess: return correct psSphereRot for valid" 515 593 " inputs and PS_PRECESS_ROUGH mode. (d)"); 516 594 skip_end(); 517 595 psFree(outputCoord); 518 596 psFree(rot); 519 } 597 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 598 } 599 600 520 601 //Return correct psSphereRot for valid inputs, mode = COMPLETE_A 521 602 { 603 psMemId id = psMemGetId(); 522 604 rot = psSpherePrecess(NULL, toTime, PS_PRECESS_COMPLETE_A); 523 605 outputCoord = psSphereRotApply(NULL, rot, inputCoord); 524 606 ok( outputCoord != NULL && rot != NULL, 525 "psSpherePrecess: return correct psSphereRot for valid"607 "psSpherePrecess: return correct psSphereRot for valid" 526 608 " inputs and PS_PRECESS_COMPLETE_A mode."); 527 609 psFree(outputCoord); 528 610 psFree(rot); 529 } 611 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 612 } 613 614 530 615 //Return correct psSphereRot for valid inputs, mode = COMPLETE_B 531 616 { 617 psMemId id = psMemGetId(); 532 618 rot = psSpherePrecess(NULL, toTime, PS_PRECESS_COMPLETE_B); 533 619 outputCoord = psSphereRotApply(NULL, rot, inputCoord); 534 620 ok( outputCoord != NULL && rot != NULL, 535 "psSpherePrecess: return correct psSphereRot for valid"621 "psSpherePrecess: return correct psSphereRot for valid" 536 622 " inputs and PS_PRECESS_COMPLETE_B mode."); 537 623 psFree(outputCoord); 538 624 psFree(rot); 539 } 625 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 626 } 627 628 540 629 //Return correct psSphereRot for valid inputs, mode = IAU2000A 541 630 { 631 psMemId id = psMemGetId(); 542 632 rot = psSpherePrecess(NULL, toTime, PS_PRECESS_IAU2000A); 543 633 outputCoord = psSphereRotApply(NULL, rot, inputCoord); 544 634 ok( outputCoord != NULL && rot != NULL, 545 "psSpherePrecess: return correct psSphereRot for valid"635 "psSpherePrecess: return correct psSphereRot for valid" 546 636 " inputs and PS_PRECESS_IAU2000A mode."); 637 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 547 638 } 548 639
Note:
See TracChangeset
for help on using the changeset viewer.
