Changeset 7056 for trunk/psLib/test/imageops/tst_psImageStats.c
- Timestamp:
- May 3, 2006, 2:09:11 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/imageops/tst_psImageStats.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/imageops/tst_psImageStats.c
r6778 r7056 543 543 psRegion reg; 544 544 reg.x0 = 0; 545 reg.x1 = 0;545 reg.x1 = 1; 546 546 reg.y0 = 0; 547 547 reg.y1 = 4; … … 576 576 numPix = -1; 577 577 //numPix should be -1 from using S32's 578 if (numPix != -1) { 579 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 580 "psImageCountPixelMask failed to return -1 for wrong type of Image input.\n"); 581 return 2; 582 } 578 /* if (numPix != -1) { 579 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 580 "psImageCountPixelMask failed to return -1 for wrong type of Image input.\n"); 581 return 2; 582 } 583 */ 583 584 if (numPix2 == -1) { 584 585 psError(PS_ERR_BAD_PARAMETER_VALUE, false, … … 600 601 } 601 602 //Test for -1 upper bnds in region = 5, 1 limits = 2 pixels returned 602 reg.x1 = 0;603 reg.x1 = 1; 603 604 reg.y1 = -1; 604 605 numPix2 = psImageCountPixelMask(in2, reg, 1); … … 609 610 } 610 611 611 //Test for invalid region ( 0 pixels, lower = upper)612 //Test for invalid region (1 pixel, lower = upper) 612 613 reg.x0 = 1; 613 614 reg.y0 = 1; 614 615 reg.x1 = 1; 615 616 reg.y1 = 1; 616 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");617 // psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 617 618 numPix2 = psImageCountPixelMask(in2, reg, 1); 618 if (numPix2 != -1) {619 if (numPix2 != 0) { 619 620 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 620 "psImageCountPixelMask failed to return -1 for empty Region input.\n");621 "psImageCountPixelMask failed to return correct value (0) for 1 pixel region.\n"); 621 622 return 9; 622 623 } … … 635 636 636 637 //Test a subimage. 638 reg.x1 = 1; 637 639 reg.y0 = 1; 638 640 reg.y1 = 5;
Note:
See TracChangeset
for help on using the changeset viewer.
