Index: /trunk/psLib/src/collections/psCollectionsErrors.dat
===================================================================
--- /trunk/psLib/src/collections/psCollectionsErrors.dat	(revision 4211)
+++ /trunk/psLib/src/collections/psCollectionsErrors.dat	(revision 4212)
@@ -16,4 +16,6 @@
 psVector_SORT_NULL                     psVectorSort can not sort a NULL psVector.
 psVector_UNSUPPORTED_TYPE              Input psVector is an unsupported type (0x%x).
+psVector_NULL                          The input psVector can not be NULL.
+psVector_EXTENDSIZE_NEG                The input number of elements to extend must be non-negative.
 #
 psBitSet_ALLOC_NEG_SIZE                The number of bit in a psBitSet (%d) must be greater than zero.
Index: /trunk/psLib/src/collections/psCollectionsErrors.h
===================================================================
--- /trunk/psLib/src/collections/psCollectionsErrors.h	(revision 4211)
+++ /trunk/psLib/src/collections/psCollectionsErrors.h	(revision 4212)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-08 23:40:45 $
+ *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-10 21:46:46 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -37,4 +37,6 @@
 #define PS_ERRORTEXT_psVector_SORT_NULL "psVectorSort can not sort a NULL psVector."
 #define PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE "Input psVector is an unsupported type (0x%x)."
+#define PS_ERRORTEXT_psVector_NULL "The input psVector can not be NULL."
+#define PS_ERRORTEXT_psVector_EXTENDSIZE_NEG "The input number of elements to extend must be non-negative."
 #define PS_ERRORTEXT_psBitSet_ALLOC_NEG_SIZE "The number of bit in a psBitSet (%d) must be greater than zero."
 #define PS_ERRORTEXT_psBitSet_SET_NULL "Can not operate on a NULL psBitSet."
Index: /trunk/psLib/src/collections/psPixels.c
===================================================================
--- /trunk/psLib/src/collections/psPixels.c	(revision 4211)
+++ /trunk/psLib/src/collections/psPixels.c	(revision 4212)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-09 23:51:49 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-10 21:46:46 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -132,10 +132,10 @@
 
     // determine the output image size
-    int numRows = x1-x0;
-    int numCols = y1-y0;
+    int numRows = y1-y0;
+    int numCols = x1-x0;
     if (numRows < 1 || numCols < 1) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                 PS_ERRORTEXT_psPixels_REGION_INVALID,
-                x0,x1,y0,y1);
+                y0,y1,x0,x1);
         psFree(out);
         return NULL;
@@ -150,6 +150,6 @@
         return NULL;
     }
-    *(psS32*)&out->row0 = x0;
-    *(psS32*)&out->col0 = y0;
+    *(psS32*)&out->row0 = y0;
+    *(psS32*)&out->col0 = x0;
 
     // initialize image to all zeros
@@ -169,5 +169,5 @@
         // pixel in region?
         if (x >= x0 && x < x1 && y >= y0 && y < y1) {
-            outData[x-x0][y-y0] |= maskVal;
+            outData[y-y0][x-x0] |= maskVal;
         }
     }
Index: /trunk/psLib/src/collections/psVector.c
===================================================================
--- /trunk/psLib/src/collections/psVector.c	(revision 4211)
+++ /trunk/psLib/src/collections/psVector.c	(revision 4212)
@@ -9,6 +9,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-04-29 02:25:09 $
+*  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-10 21:46:46 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -54,4 +54,10 @@
 
     elementSize = PSELEMTYPE_SIZEOF(elemType);
+    if (elementSize < 1) {
+        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
+                PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE, elemType);
+        return NULL;
+    }
+
 
     // Create vector struct
@@ -121,4 +127,41 @@
     in->n = n;
     return in;
+}
+
+psVector *psVectorExtend(psVector *vector, int delta, int nExtend)
+{
+    // can't handle a NULL vector (don't know the data type to allocate)
+    if (vector == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psVector_NULL);
+        return NULL;
+    }
+
+    // requirement on delta; if < 1, set to 10.
+    if (delta < 1) {
+        delta = 10;
+    }
+
+    // adjust the allocated size, if needed. (if nExtend < 1, this is will never happen)
+    if (nExtend > 0) {
+        unsigned int minAlloc = vector->n + nExtend + nExtend;
+        if (vector->nalloc < minAlloc) {
+            unsigned int nAlloc = delta + vector->nalloc;
+            // make sure the delta is large enough hold twice the extended length.
+            if (nAlloc < minAlloc) {
+                nAlloc = minAlloc;
+            }
+            vector = psVectorRealloc(vector, nAlloc);
+        }
+    } else if (nExtend < -vector->n) {
+        // For the case of a negative nExtend, need to check that we are not decreasing
+        // vector beyond its own length (i.e., creating a negative length).
+        nExtend = -vector->n;
+    }
+
+    // increment the length by the value specified
+    vector->n += nExtend;
+
+    return vector;
 }
 
Index: /trunk/psLib/src/collections/psVector.h
===================================================================
--- /trunk/psLib/src/collections/psVector.h	(revision 4211)
+++ /trunk/psLib/src/collections/psVector.h	(revision 4212)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-08 23:40:45 $
+ *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-10 21:46:46 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -88,4 +88,19 @@
     psVector* psVec,                   ///< Vector to reallocate.
     psU32 nalloc                       ///< Total number of elements to make available.
+);
+
+/** Extend a vector's length.
+ *
+ *  Increments a vector's length, n, by the specified number of elements.
+ *  If the allocated storage is less than the current vector's length plus
+ *  twice the number of elements to be added, it is reallocated larger by
+ *  a given amount.
+ *
+ *  @return psVector*      Pointer to the adjusted psVector
+ */
+psVector *psVectorExtend(
+    psVector *vector,                  ///< Vector to extend
+    int delta,                         ///< Amount to expand allocation, if necessary
+    int nExtend                        ///< Number of elements to add to vector length
 );
 
Index: /trunk/psLib/src/mathtypes/psVector.c
===================================================================
--- /trunk/psLib/src/mathtypes/psVector.c	(revision 4211)
+++ /trunk/psLib/src/mathtypes/psVector.c	(revision 4212)
@@ -9,6 +9,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-04-29 02:25:09 $
+*  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-10 21:46:46 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -54,4 +54,10 @@
 
     elementSize = PSELEMTYPE_SIZEOF(elemType);
+    if (elementSize < 1) {
+        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
+                PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE, elemType);
+        return NULL;
+    }
+
 
     // Create vector struct
@@ -121,4 +127,41 @@
     in->n = n;
     return in;
+}
+
+psVector *psVectorExtend(psVector *vector, int delta, int nExtend)
+{
+    // can't handle a NULL vector (don't know the data type to allocate)
+    if (vector == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, true,
+                PS_ERRORTEXT_psVector_NULL);
+        return NULL;
+    }
+
+    // requirement on delta; if < 1, set to 10.
+    if (delta < 1) {
+        delta = 10;
+    }
+
+    // adjust the allocated size, if needed. (if nExtend < 1, this is will never happen)
+    if (nExtend > 0) {
+        unsigned int minAlloc = vector->n + nExtend + nExtend;
+        if (vector->nalloc < minAlloc) {
+            unsigned int nAlloc = delta + vector->nalloc;
+            // make sure the delta is large enough hold twice the extended length.
+            if (nAlloc < minAlloc) {
+                nAlloc = minAlloc;
+            }
+            vector = psVectorRealloc(vector, nAlloc);
+        }
+    } else if (nExtend < -vector->n) {
+        // For the case of a negative nExtend, need to check that we are not decreasing
+        // vector beyond its own length (i.e., creating a negative length).
+        nExtend = -vector->n;
+    }
+
+    // increment the length by the value specified
+    vector->n += nExtend;
+
+    return vector;
 }
 
Index: /trunk/psLib/src/mathtypes/psVector.h
===================================================================
--- /trunk/psLib/src/mathtypes/psVector.h	(revision 4211)
+++ /trunk/psLib/src/mathtypes/psVector.h	(revision 4212)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-08 23:40:45 $
+ *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-10 21:46:46 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -88,4 +88,19 @@
     psVector* psVec,                   ///< Vector to reallocate.
     psU32 nalloc                       ///< Total number of elements to make available.
+);
+
+/** Extend a vector's length.
+ *
+ *  Increments a vector's length, n, by the specified number of elements.
+ *  If the allocated storage is less than the current vector's length plus
+ *  twice the number of elements to be added, it is reallocated larger by
+ *  a given amount.
+ *
+ *  @return psVector*      Pointer to the adjusted psVector
+ */
+psVector *psVectorExtend(
+    psVector *vector,                  ///< Vector to extend
+    int delta,                         ///< Amount to expand allocation, if necessary
+    int nExtend                        ///< Number of elements to add to vector length
 );
 
Index: /trunk/psLib/src/types/psPixels.c
===================================================================
--- /trunk/psLib/src/types/psPixels.c	(revision 4211)
+++ /trunk/psLib/src/types/psPixels.c	(revision 4212)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-09 23:51:49 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-10 21:46:46 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -132,10 +132,10 @@
 
     // determine the output image size
-    int numRows = x1-x0;
-    int numCols = y1-y0;
+    int numRows = y1-y0;
+    int numCols = x1-x0;
     if (numRows < 1 || numCols < 1) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                 PS_ERRORTEXT_psPixels_REGION_INVALID,
-                x0,x1,y0,y1);
+                y0,y1,x0,x1);
         psFree(out);
         return NULL;
@@ -150,6 +150,6 @@
         return NULL;
     }
-    *(psS32*)&out->row0 = x0;
-    *(psS32*)&out->col0 = y0;
+    *(psS32*)&out->row0 = y0;
+    *(psS32*)&out->col0 = x0;
 
     // initialize image to all zeros
@@ -169,5 +169,5 @@
         // pixel in region?
         if (x >= x0 && x < x1 && y >= y0 && y < y1) {
-            outData[x-x0][y-y0] |= maskVal;
+            outData[y-y0][x-x0] |= maskVal;
         }
     }
Index: /trunk/psLib/test/collections/tst_psVector.c
===================================================================
--- /trunk/psLib/test/collections/tst_psVector.c	(revision 4211)
+++ /trunk/psLib/test/collections/tst_psVector.c	(revision 4212)
@@ -14,6 +14,6 @@
  *  @author  Ross Harman, MHPCC
  *
- *  @version $Revision: 1.8 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2005-04-07 20:27:41 $
+ *  @version $Revision: 1.9 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2005-06-10 21:46:46 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -21,90 +21,251 @@
  */
 
+#include "psTest.h"
 #include "pslib_strict.h"
-#include "psTest.h"
-
-psS32 main(psS32 argc,
-           char* argv[])
-{
-
-
-    // Test A - Create S32 vector
-    printPositiveTestHeader(stdout,"psVector", "Create S32 vector");
+
+static psS32 testVectorAlloc(void);
+static psS32 testVectorRealloc(void);
+static psS32 testVectorExtend(void);
+
+testDescription tests[] = {
+                              {testVectorAlloc,-1,"psVectorAlloc",0,false},
+                              {testVectorRealloc,-2,"psVectorRealloc",0,false},
+                              {testVectorExtend,-3,"psVectorExtend",0,false},
+                              {NULL}
+                          };
+
+psS32 main(psS32 argc, char* argv[])
+{
+    psLogSetLevel(PS_LOG_INFO);
+
+    if ( ! runTestSuite(stderr,"psVector",tests,argc,argv) ) {
+        return 1;
+    }
+    return 0;
+}
+
+psS32 testVectorAlloc(void)
+{
     psVector *psVec = psVectorAlloc(5, PS_TYPE_S32);
-    printf("Vector size = %d\n", psVec->nalloc);
-    printf("Vector type = %d\n", psVec->type.type);
-    printf("Vector dimen = %d\n", psVec->type.dimen);
-    printFooter(stdout, "psVector", "Create S32 vector", true);
-
+
+    if (psVec == NULL) {
+        fprintf(stderr,"ERROR: Return is NULL\n");
+        return 1;
+    }
+    if (psVec->nalloc != 5) {
+        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        return 1;
+    }
+    if (psVec->n != psVec->nalloc) {
+        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        return 2;
+    }
+
+    if (psVec->type.type != PS_TYPE_S32) {
+        fprintf(stderr,"Vector type = %d\n", psVec->type.type);
+        return 3;
+    }
+    if (psVec->type.dimen != PS_DIMEN_VECTOR) {
+        fprintf(stderr,"Vector dimen = %d\n", psVec->type.dimen);
+        return 4;
+    }
 
     // Test B - Add data to integer vector
-    printPositiveTestHeader(stdout, "psVector", "Add data to S32 vector");
     for(psS32 i = 0; i < 5; i++) {
         psVec->data.S32[i] = i*10;
-        printf("Elem %d = %d\n", i, psVec->data.S32[i]);
-    }
-    printf("Vector size = %d\n", psVec->nalloc);
-    printf("Vector population = %d\n", psVec->n);
-    printFooter(stdout, "psVector", "Add data to S32 vector", true);
-
+    }
+
+    psVector* vecZero = psVectorAlloc(0, PS_TYPE_S32);
+    if(vecZero == NULL) {
+        fprintf(stderr,"ERROR: Return is NULL\n");
+        return 5;
+    }
+    if (vecZero->nalloc != 0) {
+        fprintf(stderr,"Vector size = %d\n", vecZero->nalloc);
+        return 6;
+    }
+    if (vecZero->n != vecZero->nalloc) {
+        fprintf(stderr,"Vector population = %d\n", vecZero->n);
+        return 7;
+    }
+
+    psLogMsg(__func__,PS_LOG_INFO, "Following should be an error.");
+    psVector* vecBogus = psVectorAlloc(10, 0);
+    if (vecBogus != NULL) {
+        fprintf(stderr,"Huh!  bogus type generated a psVector?");
+        return 20;
+    }
+
+    psFree(psVec);
+    psFree(vecZero);
+
+    return 0;
+}
+
+psS32 testVectorRealloc(void)
+{
+    // create new psVector
+    psVector *psVec = psVectorAlloc(5, PS_TYPE_S32);
+    if (psVec == NULL) {
+        fprintf(stderr,"ERROR: Return is NULL\n");
+        return 30;
+    }
+    for(psS32 i = 0; i < 5; i++) {
+        psVec->data.S32[i] = i*10;
+    }
 
     // Test C - Reallocate S32 vector bigger
-    printPositiveTestHeader(stdout,"psVector", "Reallocate S32 vector bigger");
     psVec = psVectorRealloc(psVec,10);
-    printf("Adding more elements to S32 vector...\n");
+    if (psVec == NULL) {
+        fprintf(stderr,"ERROR: Return is NULL\n");
+        return 1;
+    }
+    if (psVec->nalloc != 10) {
+        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        return 1;
+    }
+    if (psVec->n != 5) {
+        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        return 2;
+    }
+
+    if (psVec->type.type != PS_TYPE_S32) {
+        fprintf(stderr,"Vector type = %d\n", psVec->type.type);
+        return 3;
+    }
+    if (psVec->type.dimen != PS_DIMEN_VECTOR) {
+        fprintf(stderr,"Vector dimen = %d\n", psVec->type.dimen);
+        return 4;
+    }
+
     for(psS32 i = 5; i < 10; i++) {
         psVec->data.S32[i] = i*10;
         psVec->n++;
-        printf("Elem %d = %d\n", i, psVec->data.S32[i]);
-    }
-    printf("Vector size = %d\n", psVec->nalloc);
-    printf("Vector population = %d\n", psVec->n);
-    printFooter(stdout, "psVector", "Reallocate S32 vector bigger", true);
-
+    }
+
+    for(psS32 i = 0; i < 10; i++) {
+        if (psVec->data.S32[i] != i*10) {
+            fprintf(stderr,"Elem %d = %d, expected %d\n", i, psVec->data.S32[i], i*10);
+            return 5;
+        }
+    }
 
     // Test D - Reallocate S32 vector smaller
-    printPositiveTestHeader(stdout,"psVector","Reallocate S32 vector smaller");
     psVec = psVectorRealloc(psVec,3);
-    printf("Vector size = %d\n", psVec->nalloc);
+    if (psVec == NULL) {
+        fprintf(stderr,"ERROR: Return is NULL\n");
+        return 9;
+    }
+    if (psVec->nalloc != 3) {
+        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        return 10;
+    }
+    if (psVec->n != 3) {
+        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        return 11;
+    }
+
     for(psS32 i = 0; i < 3; i++) {
-        printf("Elem %d = %d\n", i, psVec->data.S32[i]);
-    }
-    printf("Vector size = %d\n", psVec->nalloc);
-    printf("Vector population = %d\n", psVec->n);
-    printFooter(stdout, "psVector", "Reallocate integer S32 smaller", true);
-
+        if (psVec->data.S32[i] != i*10) {
+            fprintf(stderr,"Elem %d = %d, expected %d\n", i, psVec->data.S32[i], i*10);
+            return 12;
+        }
+    }
+
+    psVec = psVectorRealloc(psVec,0);
+    if (psVec == NULL) {
+        fprintf(stderr,"ERROR: Return is NULL\n");
+        return 20;
+    }
+    if (psVec->nalloc != 0) {
+        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        return 21;
+    }
+    if (psVec->n != 0) {
+        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        return 22;
+    }
+
+    psVector* vecBogus = psVectorRealloc(NULL, 6);
+    if (vecBogus != NULL) {
+        fprintf(stderr,"Huh!  bogus type generated a psVector?");
+        return 25;
+    }
 
     // Test E - Free S32 vector
-    printPositiveTestHeader(stdout, "psVector", "Free S32 vector");
     psFree(psVec);
-    psS32 leaks = psMemCheckLeaks(0, NULL, stdout, false);
-    if(leaks != 0) {
-        printf("ERROR: Found %d memory leaks\n",leaks);
-    }
-    psS32 nBad = psMemCheckCorruption(0);
-    if(nBad) {
-        printf("ERROR: Found %d bad memory blocks\n", nBad);
-    }
-    printFooter(stdout, "psVector" ,"Free S32 vector", true);
-
-
-    // Test F - Attempt to create a S32 vector with zero size
-    printNegativeTestHeader(stdout,"psVector", "Attempt to create a S32 vector with zero size",
-                            "Invalid value for nalloc", 0);
-    psLogMsg(__func__,PS_LOG_INFO, "Following should be an error message.");
-    psVector *vecBad = psVectorAlloc(0, PS_TYPE_S32);
-    if(vecBad != NULL) {
-        printf("ERROR: Return is not NULL\n");
-    }
-    printFooter(stdout, "psVector", "Attempt to create a S32 vector with zero size", true);
-
-
-    // Test G - Attempt to realloc a null S32 vector
-    printNegativeTestHeader(stdout,"psVector", "Attempt to realloc a null S32 vector",
-                            "Null input vector", 0);
-    psLogMsg(__func__,PS_LOG_INFO, "Following should be an error message.");
-    psVectorRealloc(NULL,6);
-    printFooter(stdout, "psVector", "Attempt to realloc a null S32 vector", true);
-
-    return 0;
-}
+
+    return 0;
+}
+
+psS32 testVectorExtend(void)
+{
+    // create new psVector
+    psVector *psVec = psVectorAlloc(5, PS_TYPE_S32);
+    if (psVec == NULL) {
+        fprintf(stderr,"ERROR: Return is NULL\n");
+        return 1;
+    }
+
+    psVec->n = 0;
+
+    psVec = psVectorExtend(psVec, 0, 2);
+    if (psVec == NULL) {
+        fprintf(stderr,"ERROR: Return is NULL\n");
+        return 2;
+    }
+    if (psVec->nalloc != 5) { // no growth should occur
+        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        return 3;
+    }
+    if (psVec->n != 2) {
+        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        return 4;
+    }
+
+    psVec = psVectorExtend(psVec, 0, 2);
+    if (psVec == NULL) {
+        fprintf(stderr,"ERROR: Return is NULL\n");
+        return 10;
+    }
+    if (psVec->nalloc != 15) { // growth should occur
+        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        return 11;
+    }
+    if (psVec->n != 4) {
+        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        return 12;
+    }
+
+    psVec = psVectorExtend(psVec, 0, -2);
+    if (psVec == NULL) {
+        fprintf(stderr,"ERROR: Return is NULL\n");
+        return 20;
+    }
+    if (psVec->nalloc != 15) { // no growth
+        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        return 21;
+    }
+    if (psVec->n != 2) {
+        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        return 22;
+    }
+
+    psVec = psVectorExtend(psVec, 0, -20);
+    if (psVec == NULL) {
+        fprintf(stderr,"ERROR: Return is NULL\n");
+        return 30;
+    }
+    if (psVec->nalloc != 15) { // no growth
+        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        return 31;
+    }
+    if (psVec->n != 0) {
+        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        return 32;
+    }
+
+    psFree(psVec);
+
+    return 0;
+}
Index: /trunk/psLib/test/collections/verified/tst_psVector.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psVector.stderr	(revision 4211)
+++ /trunk/psLib/test/collections/verified/tst_psVector.stderr	(revision 4212)
@@ -1,6 +1,33 @@
-<DATE><TIME>|<HOST>|I|main
-    Following should be an error message.
-<DATE><TIME>|<HOST>|I|main
-    Following should be an error message.
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psVector.c                                             *
+*            TestPoint: psVector{psVectorAlloc}                                    *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+<DATE><TIME>|<HOST>|I|testVectorAlloc
+    Following should be an error.
+<DATE><TIME>|<HOST>|E|psVectorAlloc (FILE:LINENO)
+    Input psVector is an unsupported type (0x0).
+
+---> TESTPOINT PASSED (psVector{psVectorAlloc} | tst_psVector.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psVector.c                                             *
+*            TestPoint: psVector{psVectorRealloc}                                  *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
 <DATE><TIME>|<HOST>|E|psVectorRealloc (FILE:LINENO)
     psVectorRealloc must a given a non-NULL psVector to resize.  Desired datatype unknown.
+
+---> TESTPOINT PASSED (psVector{psVectorRealloc} | tst_psVector.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psVector.c                                             *
+*            TestPoint: psVector{psVectorExtend}                                   *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+
+---> TESTPOINT PASSED (psVector{psVectorExtend} | tst_psVector.c)
+
