IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 3, 2006, 2:09:11 PM (20 years ago)
Author:
drobbin
Message:

Fixed tests for psImageCountPixelMask.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/imageops/tst_psImageStats.c

    r6778 r7056  
    543543    psRegion reg;
    544544    reg.x0 = 0;
    545     reg.x1 = 0;
     545    reg.x1 = 1;
    546546    reg.y0 = 0;
    547547    reg.y1 = 4;
     
    576576    numPix = -1;
    577577    //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    */
    583584    if (numPix2 == -1) {
    584585        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     
    600601    }
    601602    //Test for -1 upper bnds in region = 5, 1 limits = 2 pixels returned
    602     reg.x1 = 0;
     603    reg.x1 = 1;
    603604    reg.y1 = -1;
    604605    numPix2 = psImageCountPixelMask(in2, reg, 1);
     
    609610    }
    610611
    611     //Test for invalid region (0 pixels, lower = upper)
     612    //Test for invalid region (1 pixel, lower = upper)
    612613    reg.x0 = 1;
    613614    reg.y0 = 1;
    614615    reg.x1 = 1;
    615616    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");
    617618    numPix2 = psImageCountPixelMask(in2, reg, 1);
    618     if (numPix2 != -1) {
     619    if (numPix2 != 0) {
    619620        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");
    621622        return 9;
    622623    }
     
    635636
    636637    //Test a subimage.
     638    reg.x1 = 1;
    637639    reg.y0 = 1;
    638640    reg.y1 = 5;
Note: See TracChangeset for help on using the changeset viewer.