Index: /trunk/psLib/test/collections/tst_psHash03.c
===================================================================
--- /trunk/psLib/test/collections/tst_psHash03.c	(revision 2623)
+++ /trunk/psLib/test/collections/tst_psHash03.c	(revision 2624)
@@ -20,27 +20,4 @@
 ID;
 static void IdFree(ID *id);
-
-// NOTE: This is my own little routine I used in debugging a memory
-// leak.  I will take this out of this file later.
-void printMemBlocks(char *myString)
-{
-    psMemBlock **memBlocks = NULL;
-    psMemBlock *tmp = NULL;
-    psS32 numBlocks = 0;
-
-    numBlocks = psMemCheckLeaks(currentId, &memBlocks, NULL,false);
-    printf("******************** %s ********************\n", myString);
-    printf("%d mem blocks\n", psMemCheckLeaks(currentId,NULL,stderr,false));
-    printf("%d blocks\n", numBlocks);
-    printf("*  ");
-    if (memBlocks != NULL) {
-        for (tmp = *memBlocks; tmp != NULL; tmp = tmp->nextBlock) {
-            printf("%d ", (psS32) tmp->id);
-        }
-    }
-    printf("*\n");
-    printf("*************************************************\n");
-    psFree(memBlocks);
-}
 
 static ID *IdAlloc(const char *name)
@@ -79,10 +56,8 @@
     currentId = psMemGetId();
 
-    printPositiveTestHeader(stdout,
-                            "psHash functions",
-                            "psHashRemove()");
+    printPositiveTestHeader(stdout,"psHash functions","psHashRemove");
 
+    // Add items to hash table
     myHashTable = psHashAlloc(NUM_HASH_TABLE_BUCKETS);
-
     i = 0;
     while (myKeys[i] != NULL) {
@@ -93,4 +68,5 @@
     TotalKeys = i - 1;
 
+    // Verify items which were just add to hash table
     i = TotalKeys;
     while (i >= 0) {
@@ -100,8 +76,10 @@
             fprintf(stderr, "%s: Hash table entry for key %s was %s (should be %s).\n",
                     __func__, myKeys[i], id->name, myData[i]);
+            return 1;
         }
         i--;
     }
 
+    // Remove each item from the table and verify item is no longer in the list
     i = 0;
     while (myKeys[i] != NULL) {
@@ -111,4 +89,5 @@
         if (!retVal) {
             fprintf(stderr,"%s: Hash table entry not removed.\n",__func__);
+            return 2;
         }
         id = psHashLookup(myHashTable, myKeys[i]);
@@ -116,12 +95,36 @@
             fprintf(stderr, "%s: Hash table entry for key %s not removed.\n",
                     __func__, "IDA");
+            return 3;
         }
         i++;
     }
+    printFooter(stdout,"psHash functions","psHashRemove()",true);
 
-    printFooter(stdout,
-                "psHash functions",
-                "psHashRemove()",
-                testStatus);
+    // Use an invalid key in the hash table: verify false is returned
+    printNegativeTestHeader(stdout,"psHashRemove","Invalid key","Key is not found in table",0);
+    if (psHashRemove(myHashTable,"BogusKey") ) {
+        psError(PS_ERR_UNKNOWN,true,"psHashRemove removed an entry with a bogus key.");
+        return 4;
+    }
+    printFooter(stdout,"psHashRemove","Invalid key",true);
+
+    // Remove with null table
+    printNegativeTestHeader(stdout,"psHashRemove","NULL table","Can not remove with NULL table",0);
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message: psHashRemove with null table");
+    retVal = psHashRemove(NULL,"ENTRY02");
+    if (retVal) {
+        psError(PS_ERR_UNKNOWN,true,"psHashRemove removed an entry from NULL hash table.");
+        return 5;
+    }
+    printFooter(stdout,"psHashRemove","NULL table",true);
+
+    // Remove with null key
+    printNegativeTestHeader(stdout,"psHashRemove","NULL key","Can not remove with NULL key",0);
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message: psHashRemove with null key");
+    if (psHashRemove(myHashTable,NULL) ) {
+        psError(PS_ERR_UNKNOWN,true,"psHashRemove removed an entry from NULL key");
+        return 6;
+    }
+    printFooter(stdout,"psHashRemove","NULL key",true);
 
     psFree(myHashTable);
@@ -130,5 +133,5 @@
     }
     memLeaks = psMemCheckLeaks(currentId,NULL,stdout,false);
-    if (0 != memLeaks) {
+    if (memLeaks != 0) {
         psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
     }
Index: /trunk/psLib/test/collections/verified/tst_psHash03.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psHash03.stderr	(revision 2623)
+++ /trunk/psLib/test/collections/verified/tst_psHash03.stderr	(revision 2624)
@@ -0,0 +1,8 @@
+<DATE><TIME>|<HOST>|I|main
+    Following should generate an error message: psHashRemove with null table
+<DATE><TIME>|<HOST>|E|psHashRemove (psHash.c:<LINENO>)
+    Input psHash can not be NULL.
+<DATE><TIME>|<HOST>|I|main
+    Following should generate an error message: psHashRemove with null key
+<DATE><TIME>|<HOST>|E|psHashRemove (psHash.c:<LINENO>)
+    Input key can not be NULL.
Index: /trunk/psLib/test/collections/verified/tst_psHash03.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psHash03.stdout	(revision 2623)
+++ /trunk/psLib/test/collections/verified/tst_psHash03.stdout	(revision 2624)
@@ -1,5 +1,5 @@
 /***************************** TESTPOINT ******************************************\
 *             TestFile: tst_psHash03.c                                             *
-*            TestPoint: psHash functions{psHashRemove()}                           *
+*            TestPoint: psHash functions{psHashRemove}                             *
 *             TestType: Positive                                                   *
 \**********************************************************************************/
@@ -8,2 +8,35 @@
 ---> TESTPOINT PASSED (psHash functions{psHashRemove()} | tst_psHash03.c)
 
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psHash03.c                                             *
+*            TestPoint: psHashRemove{Invalid key}                                  *
+*             TestType: Negative                                                   *
+*    ExpectedErrorText: Key is not found in table                                  *
+*  ExpectedStatusValue: 0                                                          *
+\**********************************************************************************/
+
+
+---> TESTPOINT PASSED (psHashRemove{Invalid key} | tst_psHash03.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psHash03.c                                             *
+*            TestPoint: psHashRemove{NULL table}                                   *
+*             TestType: Negative                                                   *
+*    ExpectedErrorText: Can not remove with NULL table                             *
+*  ExpectedStatusValue: 0                                                          *
+\**********************************************************************************/
+
+
+---> TESTPOINT PASSED (psHashRemove{NULL table} | tst_psHash03.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psHash03.c                                             *
+*            TestPoint: psHashRemove{NULL key}                                     *
+*             TestType: Negative                                                   *
+*    ExpectedErrorText: Can not remove with NULL key                               *
+*  ExpectedStatusValue: 0                                                          *
+\**********************************************************************************/
+
+
+---> TESTPOINT PASSED (psHashRemove{NULL key} | tst_psHash03.c)
+
