Changeset 2204 for trunk/psLib/test/astronomy
- Timestamp:
- Oct 26, 2004, 2:57:34 PM (22 years ago)
- Location:
- trunk/psLib/test/astronomy
- Files:
-
- 13 edited
-
tst_psAstrometry.c (modified) (13 diffs)
-
tst_psAstrometry01.c (modified) (13 diffs)
-
tst_psCoord.c (modified) (17 diffs)
-
tst_psMetadataIO.c (modified) (7 diffs)
-
tst_psMetadata_01.c (modified) (4 diffs)
-
tst_psMetadata_02.c (modified) (3 diffs)
-
tst_psMetadata_03.c (modified) (3 diffs)
-
tst_psMetadata_04.c (modified) (3 diffs)
-
tst_psMetadata_05.c (modified) (3 diffs)
-
tst_psMetadata_06.c (modified) (3 diffs)
-
tst_psTime_01.c (modified) (12 diffs)
-
tst_psTime_02.c (modified) (3 diffs)
-
tst_psTime_03.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astronomy/tst_psAstrometry.c
r2096 r2204 5 5 * @author Robert DeSonia, MHPCC 6 6 * 7 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $8 * @date $Date: 2004-10- 13 23:58:20$7 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2004-10-27 00:57:31 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 17 17 #include "pslib.h" 18 18 19 static inttestExposureAlloc(void);20 static inttestObservatoryAlloc(void);21 static inttestFPAAlloc(void);22 static inttestChipAlloc(void);23 static inttestCellAlloc(void);24 static inttestReadoutAlloc(void);19 static psS32 testExposureAlloc(void); 20 static psS32 testObservatoryAlloc(void); 21 static psS32 testFPAAlloc(void); 22 static psS32 testChipAlloc(void); 23 static psS32 testCellAlloc(void); 24 static psS32 testReadoutAlloc(void); 25 25 26 26 testDescription tests[] = { … … 34 34 }; 35 35 36 int main(intargc, char* argv[])36 psS32 main(psS32 argc, char* argv[]) 37 37 { 38 38 psLogSetLevel(PS_LOG_INFO); … … 41 41 } 42 42 43 static inttestExposureAlloc(void)43 static psS32 testExposureAlloc(void) 44 44 { 45 45 psTime* now = psTimeGetTime(PS_TIME_UTC); … … 123 123 } 124 124 125 static inttestObservatoryAlloc(void)125 static psS32 testObservatoryAlloc(void) 126 126 { 127 127 char* name = "The Kaiser Royal Observatory"; … … 173 173 } 174 174 175 static inttestFPAAlloc(void)175 static psS32 testFPAAlloc(void) 176 176 { 177 177 … … 220 220 } 221 221 222 for ( intlcv=0; lcv < 8; lcv++) {222 for (psS32 lcv=0; lcv < 8; lcv++) { 223 223 if (fpa->chips->data[lcv] != NULL) { 224 224 psLogMsg(__func__,PS_LOG_ERROR, … … 307 307 */ 308 308 309 for ( intlcv=0; lcv < 8; lcv++) {309 for (psS32 lcv=0; lcv < 8; lcv++) { 310 310 fpa->chips->data[lcv] = psAlloc(4); 311 311 } … … 329 329 } 330 330 331 static inttestChipAlloc(void)331 static psS32 testChipAlloc(void) 332 332 { 333 333 char* name = "The Kaiser Royal Observatory"; … … 372 372 } 373 373 374 for ( intlcv=0; lcv < 8; lcv++) {374 for (psS32 lcv=0; lcv < 8; lcv++) { 375 375 if (chip->cells->data[lcv] != NULL) { 376 376 psLogMsg(__func__,PS_LOG_ERROR, … … 477 477 } 478 478 479 static inttestCellAlloc(void)479 static psS32 testCellAlloc(void) 480 480 { 481 481 char* name = "The Kaiser Royal Observatory"; … … 522 522 } 523 523 524 for ( intlcv=0; lcv < 8; lcv++) {524 for (psS32 lcv=0; lcv < 8; lcv++) { 525 525 if (cell1->readouts->data[lcv] != NULL) { 526 526 psLogMsg(__func__,PS_LOG_ERROR, … … 641 641 } 642 642 643 static inttestReadoutAlloc(void)643 static psS32 testReadoutAlloc(void) 644 644 { 645 645 psImage* image = psImageAlloc(64,64,PS_TYPE_S8); -
trunk/psLib/test/astronomy/tst_psAstrometry01.c
r2109 r2204 5 5 * @author GLG, MHPCC 6 6 * 7 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $8 * @date $Date: 2004-10- 14 02:05:00$7 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2004-10-27 00:57:31 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 14 14 #include "pslib.h" 15 15 16 static inttest1( void );17 static inttest2( void );18 static inttest3( void );16 static psS32 test1( void ); 17 static psS32 test2( void ); 18 static psS32 test3( void ); 19 19 20 20 testDescription tests[] = { … … 115 115 psFPA *genSystem() 116 116 { 117 inti;118 intj;119 intk;117 psS32 i; 118 psS32 j; 119 psS32 k; 120 120 psImage *tmpImage; 121 121 // psTime* now = psTimeGetTime(PS_TIME_UTC); … … 170 170 for (k=0;k<NUM_READOUTS;k++) { 171 171 tmpImage = psImageAlloc(READOUT_NUM_COLS, READOUT_NUM_ROWS, PS_TYPE_F32); 172 for ( introw=0;row<READOUT_NUM_ROWS;row++) {173 for( intcol=0;col<READOUT_NUM_COLS;col++) {172 for (psS32 row=0;row<READOUT_NUM_ROWS;row++) { 173 for(psS32 col=0;col<READOUT_NUM_COLS;col++) { 174 174 tmpImage->data.F32[row][col] = (float) ((i * (CHIP_WIDTH + CHIP_GAP)) + 175 175 (j * (CELL_WIDTH + CELL_GAP))); … … 185 185 } 186 186 187 int main( intargc, char* argv[] )187 psS32 main( psS32 argc, char* argv[] ) 188 188 { 189 189 psLogSetLevel( PS_LOG_INFO ); … … 201 201 #define Y0 60.0 202 202 203 inttest1( void )204 { 205 inti;206 intj;203 psS32 test1( void ) 204 { 205 psS32 i; 206 psS32 j; 207 207 psFixedPattern *tmp = NULL; 208 208 float x0 = X0; … … 212 212 psImage *x = psImageAlloc(X_NUM_COLS, X_NUM_ROWS, PS_TYPE_F64); 213 213 psImage *y = psImageAlloc(Y_NUM_COLS, Y_NUM_ROWS, PS_TYPE_F64); 214 inttestStatus = 0;215 intnumPixels = 0;214 psS32 testStatus = 0; 215 psS32 numPixels = 0; 216 216 217 217 for (i=0;i<X_NUM_ROWS;i++) { … … 295 295 } 296 296 297 inttest2()298 { 299 inttestStatus = 0;297 psS32 test2() 298 { 299 psS32 testStatus = 0; 300 300 301 301 psTime* now = psTimeGetTime(PS_TIME_UTC); … … 371 371 } 372 372 373 intprintCell(psCell *cell)373 psS32 printCell(psCell *cell) 374 374 { 375 375 psReadout **readouts = (psReadout **) cell->readouts->data; … … 377 377 378 378 printf("-------------------------------\n"); 379 for ( inti = 0; i < readout->image->numRows ; i++) {380 for ( intj = 0; j < readout->image->numCols ; j++) {379 for (psS32 i = 0; i < readout->image->numRows ; i++) { 380 for (psS32 j = 0; j < readout->image->numCols ; j++) { 381 381 printf("(%.1f) ", readout->image->data.F32[i][j]); 382 382 } … … 415 415 416 416 *****************************************************************************/ 417 inttest3( void )418 { 419 intx;420 inty;417 psS32 test3( void ) 418 { 419 psS32 x; 420 psS32 y; 421 421 psPlane fpaCoord; 422 422 psFPA *myFPA = genSystem(); … … 426 426 psPlane testCoord; 427 427 428 intxReadout = 0;429 intxFPA = 0;430 for ( intchip=0;chip<NUM_CHIPS;chip++) {431 for ( intcell=0;cell<NUM_CELLS;cell++) {428 psS32 xReadout = 0; 429 psS32 xFPA = 0; 430 for (psS32 chip=0;chip<NUM_CHIPS;chip++) { 431 for (psS32 cell=0;cell<NUM_CELLS;cell++) { 432 432 for(x=0;x<CELL_WIDTH;x++) { 433 433 for (y=0;y<CELL_HEIGHT;y++) { … … 444 444 psCoordChipToCell(&cellCoord, &chipCoord, myCell); 445 445 446 if (x != ( int) cellCoord.x) {446 if (x != (psS32) cellCoord.x) { 447 447 printf("ERROR: x coord was %f, should be %d\n", cellCoord.x, x); 448 448 } 449 if (y != ( int) cellCoord.y) {449 if (y != (psS32) cellCoord.y) { 450 450 printf("ERROR: y coord was %f, should be %d\n", cellCoord.y, y); 451 451 } -
trunk/psLib/test/astronomy/tst_psCoord.c
r2201 r2204 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-10-2 6 22:51:56$8 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-10-27 00:57:31 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 15 15 #include "pslib.h" 16 16 17 static inttest1( void );18 static inttest1b( void );19 static inttest1c( void );20 static inttest2( void );21 static inttest3( void );22 static inttest4( void );23 static inttest5( void );24 static inttest6( void );25 static inttest7( void );26 static inttest8( void );27 static inttest20( void );28 static inttest21( void );29 static inttest40( void );30 static inttest41( void );17 static psS32 test1( void ); 18 static psS32 test1b( void ); 19 static psS32 test1c( void ); 20 static psS32 test2( void ); 21 static psS32 test3( void ); 22 static psS32 test4( void ); 23 static psS32 test5( void ); 24 static psS32 test6( void ); 25 static psS32 test7( void ); 26 static psS32 test8( void ); 27 static psS32 test20( void ); 28 static psS32 test21( void ); 29 static psS32 test40( void ); 30 static psS32 test41( void ); 31 31 32 32 testDescription tests[] = { … … 56 56 57 57 58 int main( intargc, char* argv[] )58 psS32 main( psS32 argc, char* argv[] ) 59 59 { 60 60 psLogSetLevel( PS_LOG_INFO ); … … 87 87 #define X0_SMALL 2.0 88 88 89 inttest1( void )89 psS32 test1( void ) 90 90 { 91 91 float tmpF32; 92 inttestStatus = 0;92 psS32 testStatus = 0; 93 93 psSphereTransform *myST = psSphereTransformAlloc(NPLAT, X0_BIG, X0_SMALL); 94 94 … … 122 122 #define NY_TERMS 4 123 123 #define NZ_TERMS 5 124 inttest1b( void )125 { 126 inttestStatus = 0;124 psS32 test1b( void ) 125 { 126 psS32 testStatus = 0; 127 127 psPlaneTransform *myPT = psPlaneTransformAlloc(NX_TERMS, NY_TERMS); 128 128 … … 148 148 return(testStatus); 149 149 } 150 inttest1c( void )151 { 152 inttestStatus = 0;150 psS32 test1c( void ) 151 { 152 psS32 testStatus = 0; 153 153 psPlaneDistort *myPD = psPlaneDistortAlloc(NW_TERMS, NX_TERMS, NY_TERMS, NZ_TERMS); 154 154 … … 195 195 #define N 10 196 196 // We do a simple identity transformation on a few x,y pairs. 197 inttest2( void )198 { 199 inti;200 inttestStatus = 0;197 psS32 test2( void ) 198 { 199 psS32 i; 200 psS32 testStatus = 0; 201 201 psPlane in; 202 202 psPlane out; … … 235 235 // We do a simple identity transformation on a few x,y pairs. For x and y, 236 236 // we add in the COLOR and MAGNITUDE. 237 inttest3( void )238 { 239 inti;240 inttestStatus = 0;237 psS32 test3( void ) 238 { 239 psS32 i; 240 psS32 testStatus = 0; 241 241 psPlane in; 242 242 psPlane out; … … 277 277 #define DEG_INC 30.0 278 278 // We do a simple identity transformation on a few RA, DEC pairs. 279 inttest4( void )280 { 281 inttestStatus = 0;279 psS32 test4( void ) 280 { 281 psS32 testStatus = 0; 282 282 psSphere in; 283 283 psSphere out; … … 315 315 } 316 316 317 inttest5( void )318 { 319 inttestStatus = 0;317 psS32 test5( void ) 318 { 319 psS32 testStatus = 0; 320 320 psTime* now = psTimeGetTime(PS_TIME_UTC); 321 321 struct tm *tm_time = psTimeToTM(now); … … 354 354 355 355 356 inttest6( void )357 { 358 inttestStatus = 0;356 psS32 test6( void ) 357 { 358 psS32 testStatus = 0; 359 359 psTime* now = psTimeGetTime(PS_TIME_UTC); 360 360 struct tm *tm_time = psTimeToTM(now); … … 393 393 394 394 395 inttest7( void )396 { 397 inttestStatus = 0;395 psS32 test7( void ) 396 { 397 psS32 testStatus = 0; 398 398 // XXX: This test code is simply a copy of the original source code. 399 399 double phi = 62.6; … … 426 426 } 427 427 428 inttest8( void )429 { 430 inttestStatus = 0;428 psS32 test8( void ) 429 { 430 psS32 testStatus = 0; 431 431 // XXX: This test code is simply a copy of the original source code. 432 432 double phi = -62.6; … … 459 459 } 460 460 461 inttest20( void )462 { 463 inttestStatus = 0;461 psS32 test20( void ) 462 { 463 psS32 testStatus = 0; 464 464 psSphere in; 465 465 double R; … … 553 553 554 554 #define SPACE_INC 10.0 555 inttest21( void )556 { 557 inttestStatus = 0;555 psS32 test21( void ) 556 { 557 psS32 testStatus = 0; 558 558 psPlane in; 559 559 double R; … … 649 649 } 650 650 651 inttest40( void )652 { 653 inttestStatus = 0;651 psS32 test40( void ) 652 { 653 psS32 testStatus = 0; 654 654 psSphere position1; 655 655 psSphere position2; … … 714 714 } 715 715 716 inttest41( void )717 { 718 inttestStatus = 0;716 psS32 test41( void ) 717 { 718 psS32 testStatus = 0; 719 719 psSphere position1; 720 720 psSphere *position2; -
trunk/psLib/test/astronomy/tst_psMetadataIO.c
r1986 r2204 13 13 * @author Ross Harman, MHPCC 14 14 * 15 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-10- 06 22:51:31 $15 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-10-27 00:57:31 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 80 80 vec = (psVector*)metadataItem->data.V; 81 81 printf("Key Value: "); 82 for( inti=0; i<vec->nalloc;i++) {82 for(psS32 i=0; i<vec->nalloc;i++) { 83 83 printf("%d ", vec->data.S32[i]); 84 84 } … … 103 103 static void printMetadataTable(psHash *mdTable) 104 104 { 105 inti;105 psS32 i; 106 106 psHashBucket* ptr = NULL; 107 107 for(i=0; i<mdTable->nbucket; i++) { … … 123 123 124 124 125 int main(intargc, char* argv[])125 psS32 main(psS32 argc, char* argv[]) 126 126 { 127 127 // Test A - Read config file with overwrite set true 128 128 printPositiveTestHeader(stdout, "psMetadata", "Test A - Read config file with overwrite set true"); 129 129 psMetadata *metadata1 = NULL; 130 intfailedLines1 = 0;130 psS32 failedLines1 = 0; 131 131 failedLines1 = psMetadataParseConfig(&metadata1, "test.config", true); 132 132 printf("Failed lines: %d Expected: 6\n", failedLines1); … … 138 138 printPositiveTestHeader(stdout, "psMetadata", "Test B - Read config file with overwrite set false"); 139 139 psMetadata *metadata2 = NULL; 140 intfailedLines2 = 0;140 psS32 failedLines2 = 0; 141 141 failedLines2 = psMetadataParseConfig(&metadata2, "test.config", false); 142 142 printf("Failed lines: %d Expected: 7", failedLines2); … … 148 148 printPositiveTestHeader(stdout, "psMetadata", "Test C - Read config file without auto-allocation of metadata"); 149 149 psMetadata *metadata3 = psMetadataAlloc(); 150 intfailedLines3 = 0;150 psS32 failedLines3 = 0; 151 151 failedLines3 = psMetadataParseConfig(&metadata3, "test.config", false); 152 152 printf("Failed lines: %d Expected: 7", failedLines3); … … 176 176 psMemCheckLeaks(0, NULL, stdout); 177 177 psMemCheckCorruption(0); 178 intnBad = psMemCheckCorruption(0);178 psS32 nBad = psMemCheckCorruption(0); 179 179 if(nBad) { 180 180 printf("ERROR: Found %d bad memory blocks\n", nBad); -
trunk/psLib/test/astronomy/tst_psMetadata_01.c
r2153 r2204 17 17 * @author Ross Harman, MHPCC 18 18 * 19 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $20 * @date $Date: 2004-10- 15 19:26:31$19 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 20 * @date $Date: 2004-10-27 00:57:33 $ 21 21 * 22 22 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 96 96 static void printMetadataTable(psHash *mdTable) 97 97 { 98 inti;98 psS32 i; 99 99 psHashBucket* ptr = NULL; 100 100 for(i=0; i<mdTable->nbucket; i++) { … … 116 116 117 117 118 int main(intargc, char* argv[])118 psS32 main(psS32 argc, char* argv[]) 119 119 { 120 120 psMetadata *metadata1 = NULL; … … 262 262 psMemCheckLeaks(0, NULL, stdout); 263 263 psMemCheckCorruption(0); 264 intnBad = psMemCheckCorruption(0);264 psS32 nBad = psMemCheckCorruption(0); 265 265 if(nBad) { 266 266 printf("ERROR: Found %d bad memory blocks\n", nBad); -
trunk/psLib/test/astronomy/tst_psMetadata_02.c
r2012 r2204 14 14 * @author Ross Harman, MHPCC 15 15 * 16 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $17 * @date $Date: 2004-10- 07 22:31:31$16 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2004-10-27 00:57:33 $ 18 18 * 19 19 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 60 60 61 61 62 int main( intargc, char* argv[] )62 psS32 main( psS32 argc, char* argv[] ) 63 63 { 64 64 psMetadataItem *item1 = NULL; … … 136 136 psMemCheckLeaks(0, NULL, stdout); 137 137 psMemCheckCorruption(0); 138 intnBad = psMemCheckCorruption(0);138 psS32 nBad = psMemCheckCorruption(0); 139 139 if(nBad) { 140 140 printf("ERROR: Found %d bad memory blocks\n", nBad); -
trunk/psLib/test/astronomy/tst_psMetadata_03.c
r2018 r2204 14 14 * @author Ross Harman, MHPCC 15 15 * 16 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $17 * @date $Date: 2004-10- 08 01:33:14$16 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2004-10-27 00:57:33 $ 18 18 * 19 19 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 60 60 61 61 62 int main( intargc, char* argv[] )62 psS32 main( psS32 argc, char* argv[] ) 63 63 { 64 64 psMetadataItem *item1 = NULL; … … 231 231 } 232 232 psMemCheckCorruption(0); 233 intnBad = psMemCheckCorruption(0);233 psS32 nBad = psMemCheckCorruption(0); 234 234 if(nBad) { 235 235 printf("ERROR: Found %d bad memory blocks\n", nBad); -
trunk/psLib/test/astronomy/tst_psMetadata_04.c
r2023 r2204 18 18 * @author Ross Harman, MHPCC 19 19 * 20 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $21 * @date $Date: 2004-10- 08 20:53:21$20 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 21 * @date $Date: 2004-10-27 00:57:33 $ 22 22 * 23 23 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 64 64 65 65 66 int main( intargc, char* argv[] )66 psS32 main( psS32 argc, char* argv[] ) 67 67 { 68 68 psMetadataItem *item1 = NULL; … … 201 201 } 202 202 psMemCheckCorruption(0); 203 intnBad = psMemCheckCorruption(0);203 psS32 nBad = psMemCheckCorruption(0); 204 204 if(nBad) { 205 205 printf("ERROR: Found %d bad memory blocks\n", nBad); -
trunk/psLib/test/astronomy/tst_psMetadata_05.c
r2049 r2204 22 22 * @author Ross Harman, MHPCC 23 23 * 24 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $25 * @date $Date: 2004-10- 12 01:40:32$24 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 25 * @date $Date: 2004-10-27 00:57:33 $ 26 26 * 27 27 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 68 68 69 69 70 int main( intargc, char* argv[] )70 psS32 main( psS32 argc, char* argv[] ) 71 71 { 72 longdata;72 psS64 data; 73 73 psF32 fpdata; 74 74 psMetadataItem *item1 = NULL; … … 271 271 } 272 272 psMemCheckCorruption(0); 273 intnBad = psMemCheckCorruption(0);273 psS32 nBad = psMemCheckCorruption(0); 274 274 if(nBad) { 275 275 printf("ERROR: Found %d bad memory blocks\n", nBad); -
trunk/psLib/test/astronomy/tst_psMetadata_06.c
r2050 r2204 13 13 * @author Ross Harman, MHPCC 14 14 * 15 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $16 * @date $Date: 2004-10- 12 01:54:00$15 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2004-10-27 00:57:33 $ 17 17 * 18 18 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 59 59 60 60 61 int main( intargc, char* argv[] )61 psS32 main( psS32 argc, char* argv[] ) 62 62 { 63 63 psMetadataItem *item1a = NULL; … … 134 134 } 135 135 psMemCheckCorruption(0); 136 intnBad = psMemCheckCorruption(0);136 psS32 nBad = psMemCheckCorruption(0); 137 137 if(nBad) { 138 138 printf("ERROR: Found %d bad memory blocks\n", nBad); -
trunk/psLib/test/astronomy/tst_psTime_01.c
r2048 r2204 23 23 * @author Ross Harman, MHPCC 24 24 * 25 * @version $Revision: 1.1 2$ $Name: not supported by cvs2svn $26 * @date $Date: 2004-10- 12 01:34:09$25 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $ 26 * @date $Date: 2004-10-27 00:57:33 $ 27 27 * 28 28 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 34 34 #include <string.h> 35 35 36 int main(intargc, char* argv[])36 psS32 main(psS32 argc, char* argv[]) 37 37 { 38 38 psTime *testTime; … … 55 55 // Test B - Print test time 56 56 printPositiveTestHeader(stdout,"psTime", "Print test time"); 57 printf("Test time: Seconds = %ld Microseconds = %ld\n", ( long)testTime->sec, (long)testTime->usec);57 printf("Test time: Seconds = %ld Microseconds = %ld\n", (psS64)testTime->sec, (psS64)testTime->usec); 58 58 printFooter(stdout, "psTime", "Print test time", true); 59 59 … … 75 75 psTime *timeD = NULL; 76 76 timeD = psTimeFromISOTime(isoString); 77 printf("psTime: Seconds = %ld Microseconds = %d\n", ( long)timeD->sec, (psU32)timeD->usec);77 printf("psTime: Seconds = %ld Microseconds = %d\n", (psS64)timeD->sec, (psU32)timeD->usec); 78 78 psFree(isoString); 79 79 psFree(timeD); … … 90 90 timeE = psTimeConvert(timeE, PS_TIME_UTC); 91 91 psFree(timeE); 92 printf("psTime: Seconds = %ld Microseconds = %d\n", ( long)timeE->sec, (psU32)timeE->usec);92 printf("psTime: Seconds = %ld Microseconds = %d\n", (psS64)timeE->sec, (psU32)timeE->usec); 93 93 printFooter(stdout, "psTime", "Convert psTime time to UTC time", true); 94 94 … … 103 103 timeF = psTimeConvert(timeF, PS_TIME_TAI); 104 104 psFree(timeF); 105 printf("psTime: Seconds = %ld Microseconds = %d\n", ( long)timeF->sec, (psU32)timeF->usec);105 printf("psTime: Seconds = %ld Microseconds = %d\n", (psS64)timeF->sec, (psU32)timeF->usec); 106 106 printFooter(stdout, "psTime", "Convert UTC time to psTime", true); 107 107 … … 119 119 psTime *timeH = NULL; 120 120 timeH = psTimeFromMJD(mjdTime); 121 printf("psTime: Seconds = %ld Microseconds = %d\n", ( long)timeH->sec, (psU32)timeH->usec);121 printf("psTime: Seconds = %ld Microseconds = %d\n", (psS64)timeH->sec, (psU32)timeH->usec); 122 122 psFree(timeH); 123 123 printFooter(stdout, "psTime", "Convert MJD time to psTime", true); … … 136 136 psTime *timeJ = NULL; 137 137 timeJ = psTimeFromJD(jdTime); 138 printf("psTime: Seconds = %ld Microseconds = %d\n", ( long)timeJ->sec, (psU32)timeJ->usec);138 printf("psTime: Seconds = %ld Microseconds = %d\n", (psS64)timeJ->sec, (psU32)timeJ->usec); 139 139 psFree(timeJ); 140 140 printFooter(stdout, "psTime", "Convert JD time to psTime", true); … … 145 145 struct timeval timevalTime; 146 146 timevalTime = psTimeToTimeval(testTime); 147 printf("timevalTime: Seconds = %ld Microseconds = %ld\n", ( long)timevalTime.tv_sec, (long)timevalTime.tv_usec);147 printf("timevalTime: Seconds = %ld Microseconds = %ld\n", (psS64)timevalTime.tv_sec, (psS64)timevalTime.tv_usec); 148 148 printFooter(stdout, "psTime", "Convert psTime to timeval time", true); 149 149 … … 153 153 psTime *timeL = NULL; 154 154 timeL = psTimeFromTimeval(&timevalTime); 155 printf("psTime: Seconds = %ld Microseconds = %d\n", ( long)timeL->sec, (psU32)timeL->usec);155 printf("psTime: Seconds = %ld Microseconds = %d\n", (psS64)timeL->sec, (psU32)timeL->usec); 156 156 psFree(timeL); 157 157 printFooter(stdout, "psTime", "Convert timeval time to psTime", true); … … 176 176 psTime *timeN = NULL; 177 177 timeN = psTimeFromTM(tmTime); 178 printf("psTime: Seconds = %ld Microseconds = %d\n", ( long)timeN->sec, (psU32)timeN->usec);178 printf("psTime: Seconds = %ld Microseconds = %d\n", (psS64)timeN->sec, (psU32)timeN->usec); 179 179 psFree(timeN); 180 180 psFree(tmTime); … … 198 198 psMemCheckLeaks(0, NULL, stdout); 199 199 psMemCheckCorruption(0); 200 intnBad = psMemCheckCorruption(0);200 psS32 nBad = psMemCheckCorruption(0); 201 201 if(nBad) { 202 202 printf("ERROR: Found %d bad memory blocks\n", nBad); -
trunk/psLib/test/astronomy/tst_psTime_02.c
r2177 r2204 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-10-2 0 20:02:46$12 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-10-27 00:57:33 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 20 20 #include "psTest.h" 21 21 22 int main(intargc, char* argv[])22 psS32 main(psS32 argc, char* argv[]) 23 23 { 24 24 … … 44 44 psMemCheckLeaks(0, NULL, stdout); 45 45 psMemCheckCorruption(0); 46 intnBad = psMemCheckCorruption(0);46 psS32 nBad = psMemCheckCorruption(0); 47 47 if(nBad) { 48 48 printf("ERROR: Found %d bad memory blocks\n", nBad); -
trunk/psLib/test/astronomy/tst_psTime_03.c
r2177 r2204 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-10-2 0 20:03:10$14 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-10-27 00:57:33 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 23 23 24 24 #define PRINT_TIME(TEXT,TIME) \ 25 printf("%s Seconds = %ld Microseconds = %u\n", TEXT, ( long int)TIME->sec, TIME->usec);25 printf("%s Seconds = %ld Microseconds = %u\n", TEXT, (psS64)TIME->sec, TIME->usec); 26 26 27 int main(intargc, char* argv[])27 psS32 main(psS32 argc, char* argv[]) 28 28 { 29 29 … … 135 135 psMemCheckLeaks(0, NULL, stdout); 136 136 psMemCheckCorruption(0); 137 intnBad = psMemCheckCorruption(0);137 psS32 nBad = psMemCheckCorruption(0); 138 138 if(nBad) { 139 139 printf("ERROR: Found %d bad memory blocks\n", nBad);
Note:
See TracChangeset
for help on using the changeset viewer.
