Index: trunk/psLib/test/imageops/tst_psImageStats.c
===================================================================
--- trunk/psLib/test/imageops/tst_psImageStats.c	(revision 6778)
+++ trunk/psLib/test/imageops/tst_psImageStats.c	(revision 7056)
@@ -543,5 +543,5 @@
     psRegion reg;
     reg.x0 = 0;
-    reg.x1 = 0;
+    reg.x1 = 1;
     reg.y0 = 0;
     reg.y1 = 4;
@@ -576,9 +576,10 @@
     numPix = -1;
     //numPix should be -1 from using S32's
-    if (numPix != -1) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psImageCountPixelMask failed to return -1 for wrong type of Image input.\n");
-        return 2;
-    }
+    /*    if (numPix != -1) {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                    "psImageCountPixelMask failed to return -1 for wrong type of Image input.\n");
+            return 2;
+        }
+    */
     if (numPix2 == -1) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, false,
@@ -600,5 +601,5 @@
     }
     //Test for -1 upper bnds in region = 5, 1 limits = 2 pixels returned
-    reg.x1 = 0;
+    reg.x1 = 1;
     reg.y1 = -1;
     numPix2 = psImageCountPixelMask(in2, reg, 1);
@@ -609,14 +610,14 @@
     }
 
-    //Test for invalid region (0 pixels, lower = upper)
+    //Test for invalid region (1 pixel, lower = upper)
     reg.x0 = 1;
     reg.y0 = 1;
     reg.x1 = 1;
     reg.y1 = 1;
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
+    //    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
     numPix2 = psImageCountPixelMask(in2, reg, 1);
-    if (numPix2 != -1) {
+    if (numPix2 != 0) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psImageCountPixelMask failed to return -1 for empty Region input.\n");
+                "psImageCountPixelMask failed to return correct value (0) for 1 pixel region.\n");
         return 9;
     }
@@ -635,4 +636,5 @@
 
     //Test a subimage.
+    reg.x1 = 1;
     reg.y0 = 1;
     reg.y1 = 5;
