Index: /trunk/psLib/test/collections/tst_psList.c
===================================================================
--- /trunk/psLib/test/collections/tst_psList.c	(revision 3110)
+++ /trunk/psLib/test/collections/tst_psList.c	(revision 3111)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-02-02 20:20:18 $
+ *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-02 21:58:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -185,4 +185,13 @@
     }
 
+    // Verify error message is generate with non-mutable iterator
+    psLogMsg(__func__,PS_LOG_INFO,"Non-mutable list should generate error message");
+    currentIterator->mutable = false;
+    if(psListAddAfter(currentIterator,data2)) {
+        psError(PS_ERR_UNKNOWN,true,"psListAddAfter should have generated error for non-mutable list add");
+        return 7;
+    }
+    currentIterator->mutable = true;
+
     psFree(data);
     psFree(data1);
@@ -256,4 +265,13 @@
     }
 
+    // Verify error message is generate with non-mutable iterator
+    psLogMsg(__func__,PS_LOG_INFO,"Non-mutable list should generate error message");
+    currentIterator->mutable = false;
+    if(psListAddBefore(currentIterator,data2)) {
+        psError(PS_ERR_UNKNOWN,true,"psListAddBefore should have generated error for non-mutable list add");
+        return 7;
+    }
+    currentIterator->mutable = true;
+
     psFree(data1);
     psFree(data2);
@@ -284,4 +302,5 @@
 
     //  1. list is NULL (error)
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error for using NULL list.");
     if (psListAdd(NULL,PS_LIST_HEAD,data)) {
         psError(PS_ERR_UNKNOWN, true,"psListAdd was given a NULL list, but returned a true/success.");
@@ -297,4 +316,5 @@
 
     //  2. data is NULL (error, list should not grow)
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error msg to add NULL data");
     if (psListAdd(list, PS_LIST_HEAD,NULL)) {
         psError(PS_ERR_UNKNOWN, true,"psListAdd successfully added a NULL data item?");
@@ -428,8 +448,9 @@
     *data = 7;
     // Test requirment SDR-169
-    if ( ! psListAdd(list,2,data) ) {
+    if ( ! psListAdd(list,-2,data) ) {
         psError(PS_ERR_UNKNOWN, true,"psListAdd failed to add data to 2 position.");
         return 32;
     }
+
     // Test requirment SDR-175
     if (psMemGetRefCounter(data) != 2) {
@@ -439,5 +460,5 @@
     psFree(data);
     // verify that the size incremented
-    if (list->size != 6  || *(psS32 *)list->head->next->next->data != 7) {
+    if (list->size != 6  || *(psS32 *)list->tail->prev->data != 7) {
         printListInt(list);
         psError(PS_ERR_UNKNOWN, true,"psListAdd didn't insert to position #2.");
Index: /trunk/psLib/test/collections/verified/tst_psList.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psList.stderr	(revision 3110)
+++ /trunk/psLib/test/collections/verified/tst_psList.stderr	(revision 3111)
@@ -18,6 +18,10 @@
 <DATE><TIME>|<HOST>|I|testListAdd
     psListAdd shall add an element to list
+<DATE><TIME>|<HOST>|I|testListAdd
+    Following should generate an error for using NULL list.
 <DATE><TIME>|<HOST>|E|psListAdd (psList.c:<LINENO>)
     Specified psList reference is NULL.
+<DATE><TIME>|<HOST>|I|testListAdd
+    Following should generate an error msg to add NULL data
 <DATE><TIME>|<HOST>|E|psListAdd (psList.c:<LINENO>)
     Specified data item is NULL.
@@ -25,5 +29,5 @@
     Following should error with invalid insert location
 <DATE><TIME>|<HOST>|E|psListIteratorSet (psList.c:<LINENO>)
-    Specified location, -7, is invalid.
+    Specified location, -6, is invalid.
 <DATE><TIME>|<HOST>|I|testListAdd
     Following should be a warning.
@@ -133,4 +137,8 @@
 <DATE><TIME>|<HOST>|E|psListAddAfter (psList.c:<LINENO>)
     Specified iterator is NULL.
+<DATE><TIME>|<HOST>|I|testListAddAfter
+    Non-mutable list should generate error message
+<DATE><TIME>|<HOST>|E|psListAddAfter (psList.c:<LINENO>)
+    Specified iterator indicates list is non-mutable.
 
 ---> TESTPOINT PASSED (psList{psListAddAfter} | tst_psList.c)
@@ -150,4 +158,8 @@
 <DATE><TIME>|<HOST>|E|psListAddBefore (psList.c:<LINENO>)
     Specified iterator is NULL.
+<DATE><TIME>|<HOST>|I|testListAddBefore
+    Non-mutable list should generate error message
+<DATE><TIME>|<HOST>|E|psListAddBefore (psList.c:<LINENO>)
+    Specified iterator indicates list is non-mutable.
 
 ---> TESTPOINT PASSED (psList{psListAddBefore} | tst_psList.c)
