Index: /trunk/psLib/test/collections/tst_psArray.c
===================================================================
--- /trunk/psLib/test/collections/tst_psArray.c	(revision 2384)
+++ /trunk/psLib/test/collections/tst_psArray.c	(revision 2385)
@@ -8,10 +8,14 @@
  *     C)  Reallocate void pointer array bigger
  *     D)  Reallocate void pointer array smaller
- *     E)  Free void pointer array
+ *     E)  Reallocate with null pointer
+ *     F)  Remove item from array
+ *     G)  Remove invalid item from array
+ *     H)  Remove item from null array
+ *     I)  Free void pointer array
  *
  *  @author  Ross Harman, MHPCC
  *
- *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-11-12 22:28:16 $
+ *  @version $Revision: 1.7 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2004-11-19 00:34:22 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -138,5 +142,5 @@
     printFooter(stdout, "psArray", "Reallocate integer void pointer smaller", true);
 
-    // Test D1 - Reallocate with a null
+    // Test E - Reallocate with a null
     printNegativeTestHeader(stdout,"psArray","Reallocate with a null array",
                             "Error message generator", 0 );
@@ -148,5 +152,43 @@
     printFooter(stdout,"psArray","Reallocate with a null array",true);
 
-    // Test E - Free void pointer array
+
+    // Test F - Remove item from array
+    printPositiveTestHeader(stdout, "psArray", "Remove valid item");
+    if( !psArrayRemove(psArr,mySt[0]) ) {
+        psError(PS_ERR_UNKNOWN,true,"Unable to remove valid item");
+        return 100;
+    }
+    printf("Array size after removal = %d\n",psArr->n);
+    if ( psArr->n != 2 ) {
+        psError(PS_ERR_UNKNOWN, true, "Items in array not decremented after removal");
+        return 101;
+    }
+    for(psS32 i = 0; i < psArr->n; i++) {
+        testStruct *ts = (testStruct*)psArr->data[i];
+        printf("ts[%d].x = %d ts[%d].y = %.2f\n", i, ts->x, i, ts->y);
+        if(fabsf(ts->x - 10*(i+1)) > 0.01f || fabsf(ts->y - 10.1*(i+1)) > 0.01f) {
+            psError(PS_ERR_UNKNOWN, true, "Elements not as expected after remove.");
+            return 102;
+        }
+    }
+    psFree(mySt[0]);
+    printFooter(stdout,"psArray","Remove valid item", true);
+
+    // Test G - Remove invalid item from array
+    printPositiveTestHeader(stdout, "psArray", "Remove invalid item from array");
+    if( psArrayRemove(psArr,mySt[9]) ) {
+        psError(PS_ERR_UNKNOWN,true,"Removed invalid item from array");
+        return 103;
+    }
+    printFooter(stdout,"psArray","Remove invalid item from array",true);
+
+    // Test H - Remove item from null array
+    printPositiveTestHeader(stdout, "psArray", "Remove item from null array");
+    if ( psArrayRemove(NULL,mySt[1]) ) {
+        psError(PS_ERR_UNKNOWN,true,"Removed valid item from null array");
+        return 104;
+    }
+
+    // Test I - Free void pointer array
     printPositiveTestHeader(stdout, "psArray", "Free void pointer array");
     psFree(psArr);
@@ -154,8 +196,12 @@
         psFree(mySt[i]);
     }
-    psMemCheckLeaks(0, NULL, stdout);
+    if( psMemCheckLeaks(0, NULL, stdout) != 0) {
+        psError(PS_ERR_UNKNOWN,true,"Memory leaks detected.");
+        return 110;
+    }
     psS32 nBad = psMemCheckCorruption(0);
     if(nBad) {
         printf("ERROR: Found %d bad memory blocks\n", nBad);
+        return 111;
     }
     printFooter(stdout, "psArray" ,"Free void pointer array", true);
Index: /trunk/psLib/test/collections/verified/tst_psArray.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psArray.stdout	(revision 2384)
+++ /trunk/psLib/test/collections/verified/tst_psArray.stdout	(revision 2385)
@@ -73,4 +73,31 @@
 /***************************** TESTPOINT ******************************************\
 *             TestFile: tst_psArray.c                                              *
+*            TestPoint: psArray{Remove valid item}                                 *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+Array size after removal = 2
+ts[0].x = 10 ts[0].y = 10.10
+ts[1].x = 20 ts[1].y = 20.20
+
+---> TESTPOINT PASSED (psArray{Remove valid item} | tst_psArray.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psArray.c                                              *
+*            TestPoint: psArray{Remove invalid item from array}                    *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+
+---> TESTPOINT PASSED (psArray{Remove invalid item from array} | tst_psArray.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psArray.c                                              *
+*            TestPoint: psArray{Remove item from null array}                       *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psArray.c                                              *
 *            TestPoint: psArray{Free void pointer array}                           *
 *             TestType: Positive                                                   *
