Index: /trunk/psLib/test/mathtypes/tap_psVector.c
===================================================================
--- /trunk/psLib/test/mathtypes/tap_psVector.c	(revision 7788)
+++ /trunk/psLib/test/mathtypes/tap_psVector.c	(revision 7789)
@@ -5,5 +5,5 @@
 int main (void)
 {
-    plan_tests(131);
+    plan_tests(136);
 
     diag("psVectorAlloc() tests");
@@ -391,5 +391,5 @@
     {
         ok(psVectorCountPixelMask(NULL, 1) == -1,
-           "psVectorCountPixelMask returned -1 for NULL Vector input.");
+           "psVectorCountPixelMask returned -1 for NULL Vector input");
     }
 
@@ -404,11 +404,11 @@
 
         ok(psVectorCountPixelMask(vec, 1) == -1,
-           "returned -1 for wrong type of Vector input.");
-
-        psFree(vec);
-    }
-
-    {
-        psVector *vec = vec = psVectorAlloc(5, PS_TYPE_U8);
+           "returned -1 for wrong type of Vector input");
+
+        psFree(vec);
+    }
+
+    {
+        psVector *vec = psVectorAlloc(5, PS_TYPE_U8);
         vec->data.U8[0] = 0;
         vec->data.U8[1] = 1;
@@ -419,8 +419,53 @@
         long numPix = psVectorCountPixelMask(vec, 1);
 
-        ok(numPix != -1, "returned -1 for correct Vector input\n");
-        ok(numPix == 2, "returned pixel count %d\n", numPix);
-
-        psFree(vec);
+        ok(numPix != -1, "returned -1 for correct Vector input");
+        ok(numPix == 2, "returned pixel count %d", numPix);
+
+        psFree(vec);
+    }
+
+
+    diag("psVectorLength() tests");
+
+    {
+        psVector *vector = psVectorAlloc(5, PS_TYPE_F32);
+
+        ok(psVectorLength(vector) == 0,
+           "returned the correct length of vector");
+
+        psFree(vector);
+    }
+
+    {
+        psVector *vector = psVectorAlloc(5, PS_TYPE_F32);
+        vector->n = 5;
+
+        ok(psVectorLength(vector) == 5,
+           "returned the correct length of vector");
+
+        psFree(vector);
+    }
+
+    {
+        psVector *vector = psVectorAlloc(6, PS_TYPE_F32);
+        vector->n = 6;
+
+        ok(psVectorLength(vector) == 6,
+           "returned the correct length of vector");
+
+        psFree(vector);
+    }
+
+    {
+        ok(psVectorLength(NULL) == -1, "returned -1 for a NULL input vector");
+    }
+
+    {
+        psArray *array = psArrayAlloc(5);
+
+        ok(psVectorLength((psVector*)array) == -1,
+           "returned-1 for an invalid input vector");
+
+        psFree(array);
     }
 
@@ -429,47 +474,4 @@
 
 # if 0
-
-psS32 testVectorLength( void )
-{
-    psVector *vector = psVectorAlloc(5, PS_TYPE_F32);
-
-    if (psVectorLength(vector) != 0) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psVectorLength failed to return the correct length of vector.\n");
-        return 1;
-    }
-    vector->n = 5;
-    if (psVectorLength(vector) != 5) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psVectorLength failed to return the correct length of vector.\n");
-        return 2;
-    }
-    vector->n++;
-    if (psVectorLength(vector) != 6) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psVectorLength failed to return the correct length of vector.\n");
-        return 3;
-    }
-    psFree(vector);
-
-    psVector *emptyVector = NULL;
-    psArray *array = psArrayAlloc(5);
-
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    if (psVectorLength(emptyVector) != -1) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psVectorLength failed to return -1 for a NULL input vector.\n");
-        return 4;
-    }
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    if (psVectorLength((psVector*)array) != -1) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
-                "psVectorLength failed to return -1 for an invalid input vector.\n");
-        return 5;
-    }
-    psFree(array);
-
-    return 0;
-}
 
 psS32 testVectorCopy(void)
