Changeset 4579 for trunk/psModules/test/tst_pmObjects01.c
- Timestamp:
- Jul 18, 2005, 3:44:48 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psModules/test/tst_pmObjects01.c (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/tst_pmObjects01.c
r4221 r4579 19 19 * abd never deallocate, no error is generated. 20 20 * 21 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $22 * @date $Date: 2005-0 6-13 19:59:21$21 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 22 * @date $Date: 2005-07-19 01:44:48 $ 23 23 * 24 24 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 128 128 } else { 129 129 if ((tmpModel->params->n != 7) || (tmpModel->dparams->n != 7)) { 130 printf("TEST ERROR: pmModelAlloc(PS_MODEL_GAUSS) allocated an incorrect number of params (% d, %d)\n",130 printf("TEST ERROR: pmModelAlloc(PS_MODEL_GAUSS) allocated an incorrect number of params (%ld, %ld)\n", 131 131 tmpModel->params->n, tmpModel->dparams->n); 132 132 testStatus = false; … … 150 150 } else { 151 151 if ((tmpModel->params->n != 7) || (tmpModel->dparams->n != 7)) { 152 printf("TEST ERROR: pmModelAlloc(PS_MODEL_PGAUSS) allocated an incorrect number of params (% d, %d)\n",152 printf("TEST ERROR: pmModelAlloc(PS_MODEL_PGAUSS) allocated an incorrect number of params (%ld, %ld)\n", 153 153 tmpModel->params->n, tmpModel->dparams->n); 154 154 testStatus = false; … … 172 172 } else { 173 173 if ((tmpModel->params->n != 11) || (tmpModel->dparams->n != 11)) { 174 printf("TEST ERROR: pmModelAlloc(PS_MODEL_TWIST_GAUSS) allocated an incorrect number of params (% d, %d)\n",174 printf("TEST ERROR: pmModelAlloc(PS_MODEL_TWIST_GAUSS) allocated an incorrect number of params (%ld, %ld)\n", 175 175 tmpModel->params->n, tmpModel->dparams->n); 176 176 testStatus = false; … … 194 194 } else { 195 195 if ((tmpModel->params->n != 9) || (tmpModel->dparams->n != 9)) { 196 printf("TEST ERROR: pmModelAlloc(PS_MODEL_WAUSS) allocated an incorrect number of params (% d, %d)\n",196 printf("TEST ERROR: pmModelAlloc(PS_MODEL_WAUSS) allocated an incorrect number of params (%ld, %ld)\n", 197 197 tmpModel->params->n, tmpModel->dparams->n); 198 198 testStatus = false; … … 216 216 } else { 217 217 if ((tmpModel->params->n != 8) || (tmpModel->dparams->n != 8)) { 218 printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC) allocated an incorrect number of params (% d, %d)\n",218 printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC) allocated an incorrect number of params (%ld, %ld)\n", 219 219 tmpModel->params->n, tmpModel->dparams->n); 220 220 testStatus = false; … … 238 238 } else { 239 239 if ((tmpModel->params->n != 12) || (tmpModel->dparams->n != 12)) { 240 printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC_CORE) allocated an incorrect number of params (% d, %d)\n",240 printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC_CORE) allocated an incorrect number of params (%ld, %ld)\n", 241 241 tmpModel->params->n, tmpModel->dparams->n); 242 242 testStatus = false; … … 290 290 } else { 291 291 if (outData->n != 1) { 292 printf("TEST ERROR: outData->n is % d\n", outData->n);292 printf("TEST ERROR: outData->n is %ld\n", outData->n); 293 293 testStatus = false; 294 294 } … … 316 316 317 317 if (outData->n != 0) { 318 printf("TEST ERROR: outData->n is % d\n", outData->n);318 printf("TEST ERROR: outData->n is %ld\n", outData->n); 319 319 testStatus = false; 320 320 } … … 344 344 345 345 if (outData->n != 1) { 346 printf("TEST ERROR: outData->n is % d\n", outData->n);346 printf("TEST ERROR: outData->n is %ld\n", outData->n); 347 347 testStatus = false; 348 348 } … … 370 370 371 371 if (outData->n != 0) { 372 printf("TEST ERROR: outData->n is % d\n", outData->n);372 printf("TEST ERROR: outData->n is %ld\n", outData->n); 373 373 testStatus = false; 374 374 } … … 398 398 399 399 if (outData->n != n/2) { 400 printf("TEST ERROR: outData->n is % d\n", outData->n);400 printf("TEST ERROR: outData->n is %ld\n", outData->n); 401 401 testStatus = false; 402 402 } … … 423 423 424 424 if (outData->n != 0) { 425 printf("TEST ERROR: outData->n is % d\n", outData->n);425 printf("TEST ERROR: outData->n is %ld\n", outData->n); 426 426 testStatus = false; 427 427 } … … 477 477 478 478 /****************************************************************************** 479 test02(): 479 test02(): 480 480 // XXX: Must test flat peaks. 481 481 // XXX: test 1-by-n and n-by-1 images. … … 539 539 } 540 540 if (outData->n != expectedNumPeaks) { 541 printf("TEST ERROR: pmFindImagePeaks found % d peaks (should be %d)\n", outData->n, expectedNumPeaks);541 printf("TEST ERROR: pmFindImagePeaks found %ld peaks (should be %d)\n", outData->n, expectedNumPeaks); 542 542 testStatus = false; 543 543 } … … 681 681 /* XXX: Modify for new pmCullPeaks 682 682 outData = pmCullPeaks(outData, PS_MAX_F32, NULL); 683 683 684 684 if (outData == NULL) { 685 685 printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n"); … … 702 702 printf("Calling pmCullPeaks with tiny maxValue and NULL psRegion.\n"); 703 703 outData = pmFindImagePeaks(imgData, 0.0); 704 printf("pmFindImagePeaks found % d peaks\n", outData->n);704 printf("pmFindImagePeaks found %ld peaks\n", outData->n); 705 705 /* XXX: Modify for new pmCullPeaks 706 706 outData = pmCullPeaks(outData, 0.0, NULL); 707 707 708 708 if (outData == NULL) { 709 709 printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n"); … … 726 726 printf("Calling pmCullPeaks with large maxValue and disjoint psRegion.\n"); 727 727 outData = pmFindImagePeaks(imgData, 0.0); 728 printf("pmFindImagePeaks found % d peaks\n", outData->n);728 printf("pmFindImagePeaks found %ld peaks\n", outData->n); 729 729 psRegion tmpRegion = psRegionSet(10000.0, 20000.0, 10000.0, 20000.0); 730 730 731 731 /* XXX: Modify for new pmCullPeaks 732 732 outData = pmCullPeaks(outData, PS_MAX_F32, tmpRegion); 733 733 734 734 if (outData == NULL) { 735 735 printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n"); … … 752 752 printf("Calling pmCullPeaks with large maxValue and non-disjoint psRegion.\n"); 753 753 outData = pmFindImagePeaks(imgData, 0.0); 754 printf("pmFindImagePeaks found % d peaks\n", outData->n);754 printf("pmFindImagePeaks found %ld peaks\n", outData->n); 755 755 tmpRegion = psRegionSet(-PS_MAX_F32, PS_MAX_F32, -PS_MAX_F32, PS_MAX_F32); 756 756 /* XXX: Modify for new pmCullPeaks 757 757 outData = pmCullPeaks(outData, PS_MAX_F32, tmpRegion); 758 758 759 759 if (outData == NULL) { 760 760 printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n"); … … 1145 1145 testStatus = false; 1146 1146 } 1147 1147 1148 1148 printf("----------------------------------------------------------------------------------\n"); 1149 1149 printf("Calling pmSourceSetPixelsCircle with subImage endCol > numCols. Should generate error and return NULL.\n"); … … 1156 1156 testStatus = false; 1157 1157 } 1158 1158 1159 1159 printf("----------------------------------------------------------------------------------\n"); 1160 1160 printf("Calling pmSourceSetPixelsCircle with subImage startRow < 0. Should generate error and return NULL.\n"); … … 1167 1167 testStatus = false; 1168 1168 } 1169 1169 1170 1170 printf("----------------------------------------------------------------------------------\n"); 1171 1171 printf("Calling pmSourceSetPixelsCircle with subImage endRow > numRows. Should generate error and return NULL.\n");
Note:
See TracChangeset
for help on using the changeset viewer.
