Changeset 3723 for trunk/psModules/test/tst_pmObjects01.c
- Timestamp:
- Apr 19, 2005, 1:44:54 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psModules/test/tst_pmObjects01.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/tst_pmObjects01.c
r3717 r3723 19 19 * abd never deallocate, no error is generated. 20 20 * 21 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $22 * @date $Date: 2005-04-19 2 2:58:48$21 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 22 * @date $Date: 2005-04-19 23:44:54 $ 23 23 * 24 24 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 479 479 { 480 480 printf("-------------- Calling test_pmFindVectorPeaks on an %d-by-%d image. --------------\n", numRows, numCols); 481 if ((numRows < 4) || (numCols < 4)) {482 printf("WARNING: Don't call this test with a smaller than 4-by-4 image.\n");483 return(true);484 }481 // if ((numRows < 4) || (numCols < 4)) { 482 // printf("WARNING: Don't call this test with a smaller than 4-by-4 image.\n"); 483 // return(true); 484 // } 485 485 bool testStatus = true; 486 486 psImage *inData = psImageAlloc(numCols, numRows, PS_TYPE_F32); … … 523 523 testStatus = false; 524 524 } else { 525 if (outData->size != 5) { 526 printf("TEST ERROR: pmFindImagePeaks found %d peaks (should be 4)\n", outData->size); 527 testStatus = false; 528 } 529 525 psS32 expectedNumPeaks; 526 if ((numRows == 1) && (numCols == 1)) { 527 expectedNumPeaks = 1; 528 } else if ((numRows == 1) || (numCols == 1)) { 529 expectedNumPeaks = 3; 530 } else { 531 expectedNumPeaks = 5; 532 } 533 if (outData->size != expectedNumPeaks) { 534 printf("TEST ERROR: pmFindImagePeaks found %d peaks (should be %d)\n", outData->size, expectedNumPeaks); 535 testStatus = false; 536 } 537 538 // HEY 530 539 psListElem *tmpPeakLE = (psListElem *) outData->head; 531 540 while (tmpPeakLE != NULL) { … … 537 546 if (!(tmpPeak->class & PM_PEAK_LONE) || 538 547 !(tmpPeak->class & PM_PEAK_EDGE)) { 539 printf("TEST ERROR: peak at (%d, %d) (%f) ->class set improperly (0x%x).\n", tmpPeak->y, tmpPeak->x, tmpPeak->counts, tmpPeak->class);548 printf("TEST ERROR: (0) peak at (%d, %d) (%f) ->class set improperly (0x%x).\n", tmpPeak->y, tmpPeak->x, tmpPeak->counts, tmpPeak->class); 540 549 testStatus = false; 541 550 } 542 551 } else if ((tmpPeak->x == numCols/2) && (tmpPeak->y == numRows/2)) { 543 552 if (!(tmpPeak->class & PM_PEAK_LONE)) { 544 printf("TEST ERROR: peak at (%d, %d) (%f) ->class set improperly (0x%x).\n", tmpPeak->y, tmpPeak->x, tmpPeak->counts, tmpPeak->class);553 printf("TEST ERROR: (1) peak at (%d, %d) (%f) ->class set improperly (0x%x).\n", tmpPeak->y, tmpPeak->x, tmpPeak->counts, tmpPeak->class); 545 554 testStatus = false; 546 555 } … … 599 608 // testStatus&= test_pmFindImagePeaks(5, 2); 600 609 // HEY 610 testStatus&= test_pmFindImagePeaks(1, 1); 611 testStatus&= test_pmFindImagePeaks(1, 8); 612 testStatus&= test_pmFindImagePeaks(8, 1); 601 613 testStatus&= test_pmFindImagePeaks(TST02_NUM_ROWS, TST02_NUM_COLS); 602 614 testStatus&= test_pmFindImagePeaks(2*TST02_NUM_ROWS, TST02_NUM_COLS);
Note:
See TracChangeset
for help on using the changeset viewer.
