Index: trunk/psLib/test/TABLE-SDRS-CH06-DataManip
===================================================================
--- trunk/psLib/test/TABLE-SDRS-CH06-DataManip	(revision 13305)
+++ trunk/psLib/test/TABLE-SDRS-CH06-DataManip	(revision 13306)
@@ -16,6 +16,6 @@
     Must review these files more.
     More extensie robust stats?
-    Preset answers
-    Unclear what types should be supported from SDRS:
+    They use preset answers
+    Types should be supported (from SDRS):
 	psS8, psU16, psF32, psF64
 psStatsAlloc()
@@ -33,5 +33,5 @@
 psStatsGetValue()
 			NONE		NONE	NONE	NONE
-psVectorCountPixelMask()10		10	8	10	na
+psVectorCountPixelMask()10		10	10	10	na
     mathtypes/tst_psVector.c
 psHistogramAlloc()
Index: trunk/psLib/test/mathtypes/tap_psVector.c
===================================================================
--- trunk/psLib/test/mathtypes/tap_psVector.c	(revision 13305)
+++ trunk/psLib/test/mathtypes/tap_psVector.c	(revision 13306)
@@ -2,5 +2,4 @@
 #include <string.h>
 #include <pslib.h>
-
 #include "tap.h"
 #include "pstap.h"
@@ -10,5 +9,5 @@
     psLogSetFormat("HLNM");
     psLogSetLevel(PS_LOG_INFO);
-    plan_tests(285);
+    plan_tests(294);
 
 
@@ -596,12 +595,14 @@
 
     // psVectorCountPixelMask() tests
+    // Ensure -1 return for NULL psVector input
     {
         psMemId id = psMemGetId();
         ok(psVectorCountPixelMask(NULL, 1) == -1,
-           "psVectorCountPixelMask returned -1 for NULL Vector input");
-        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
-    }
-
-
+           "psVectorCountPixelMask() returned -1 for NULL psVector input");
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
+
+
+    // Ensure -1 return for incorrect TYPE psVector input
     {
         psMemId id = psMemGetId();
@@ -613,10 +614,11 @@
         vec->data.S32[4] = 0;
         ok(psVectorCountPixelMask(vec, 1) == -1,
-           "returned -1 for wrong type of Vector input");
-        psFree(vec);
-        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
-    }
-
-
+           "psVectorCountPixelMask() returned -1 for incorrect TYPE psVector input");
+        psFree(vec);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
+
+
+    // Use correct inputs
     {
         psMemId id = psMemGetId();
@@ -628,6 +630,51 @@
         vec->data.U8[4] = 0;
         long numPix = psVectorCountPixelMask(vec, 1);
-        ok(numPix != -1, "did not return -1 for correct Vector input");
+        ok(numPix != -1, "psVectorCountPixelMask() did return -1 for correct psVector input");
         ok(numPix == 2, "returned pixel count %d", numPix);
+        psFree(vec);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
+
+
+    // Use correct inputs; psVector length of 0
+    {
+        psMemId id = psMemGetId();
+        psVector *vec = psVectorAlloc(0, PS_TYPE_U8);
+        long numPix = psVectorCountPixelMask(vec, 1);
+        ok(numPix != -1, "psVectorCountPixelMask() did return -1 for correct psVector input (length 0)");
+        ok(numPix == 0, "returned pixel count %d", numPix);
+        psFree(vec);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
+
+
+    // Use correct inputs; psVector length of 1
+    {
+        psMemId id = psMemGetId();
+        psVector *vec = psVectorAlloc(1, PS_TYPE_U8);
+        vec->data.U8[0] = 0;
+        long numPix = psVectorCountPixelMask(vec, 1);
+        ok(numPix != -1, "psVectorCountPixelMask() did return -1 for correct psVector input (length 1)");
+        ok(numPix == 0, "returned pixel count %d", numPix);
+        psFree(vec);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
+
+
+    // Use correct inputs; large psVector 
+    {
+        psMemId id = psMemGetId();
+        #define N 10
+        psVector *vec = psVectorAlloc(N, PS_TYPE_U8);
+        for (int i = 0 ; i < N ; i++) {
+            if (0 == i%2) {
+                vec->data.U8[i] = 0;
+            } else {
+                vec->data.U8[i] = 1;
+            }
+        }
+        long numPix = psVectorCountPixelMask(vec, 1);
+        ok(numPix != -1, "psVectorCountPixelMask() did return -1 for correct psVector input (length: %d)", N);
+        ok(numPix == N/2, "returned pixel count %d", numPix);
         psFree(vec);
         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
