IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7056


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

Fixed tests for psImageCountPixelMask.

Location:
trunk/psLib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/mathtypes/psVector.c

    r7055 r7056  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.72 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2006-05-03 23:16:16 $
     11*  @version $Revision: 1.73 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2006-05-04 00:09:11 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    378378    }
    379379
    380     //    printf("\nbefore psVectorCopy\n");
    381     //    psVector *out = psVectorCopy(outVector, inVector, inVector->type.type); // Copy to sort in place
    382380    outVector = psVectorCopy(outVector, inVector, inVector->type.type);
    383     //    printf("\nafter psVectorCopy\n");
    384381    if (outVector == NULL) {
    385382        psError(PS_ERR_BAD_PARAMETER_NULL, true,
     
    389386    long N = outVector->n;                    // Number of elements
    390387    if (N < 2) {
    391         //        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
    392         //                "Error in psVectorSort:  Vector has less than 2 data entries!\n");
    393         //        psFree(outVector);
    394         //        psFree(outVector);
    395         //        outVector = NULL;
    396388        return outVector;
    397389    }
  • 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;
  • trunk/psLib/test/imageops/verified/tst_psImageStats.stderr

    r6750 r7056  
    626626<HOST>|E|psImageCountPixelMask (FILE:LINENO)
    627627    Unallowable operation: psImage mask or its data is NULL.
    628 <HOST>|I|testImageCountPixel
    629     Following should generate error message
    630 <HOST>|E|psImageCountPixelMask (FILE:LINENO)
    631     Specified psRegion parameter, x0=1.000000, is out of range [0,0].
    632628
    633629---> TESTPOINT PASSED (psImage{psImageCountPixel} | tst_psImageStats.c)
Note: See TracChangeset for help on using the changeset viewer.