Index: /trunk/psLib/test/collections/tst_psList.c
===================================================================
--- /trunk/psLib/test/collections/tst_psList.c	(revision 959)
+++ /trunk/psLib/test/collections/tst_psList.c	(revision 960)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-06-09 21:20:53 $
+ *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-06-09 21:46:37 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -24,4 +24,5 @@
 static int testListConvert(void);
 static int testListIterator(void);
+static int testListFree(void);
 
 testDescription tests[] = {
@@ -32,4 +33,5 @@
                               {testListConvert,"491-testListConvert",0},
                               {testListIterator,"494-testListIterator",0},
+                              {testListFree,"627-testListFree",0},
                               {NULL}
                           };
@@ -899,12 +901,57 @@
 int testListFree(void)
 {
+    float* data[15];
+    psList* list;
 
     /*
-    Call psDlistAlloc to create a doubly linked list. Create several data items and add them to the list.
-    Verify    items are within the list. Verify the data item's reference counter are incremented after adding
-    to    the list.    Call psDlistFree with NULL specified as the elemFree function. Verify the list is
-    deallocated but    not the data    items. Verify the data item's reference counters are decremented by one
-    compared to when added    to the list.
+    Call psDlistAlloc to create a doubly linked list.
+
+    Create several data items and add them to the list.
+
+    Verify the data item's reference counter are incremented after adding to the list.
+    (not really needed, as psListAdd is tested elsewhere)
     */
+
+    list = psListAlloc(NULL);
+    for (int lcv=0;lcv<15;lcv++) {
+        data[lcv] = psAlloc(sizeof(int));
+        *data[lcv] = lcv;
+        list = psListAdd(list,data[lcv],PS_LIST_TAIL);
+        if (psMemGetRefCounter(data[lcv]) != 2) {
+            psError(__func__,"Reference counter for data was not incremented");
+            return 1;
+        }
+    }
+
+    /*
+    Verify items are within the list.
+    (not needed, as psListAdd is tested elsewhere, but check anyway.)
+    */
+    if (list->size != 15) {
+        psError(__func__,"List wasn't populated as expected?");
+        return 2;
+    }
+
+    /*
+    Call psDlistFree with NULL specified as the elemFree function.
+    */
+
+    psListFree(list,NULL);
+
+    /*
+    Verify the list is deallocated but not the data items.
+    (accomplished by checking for memory leaks)
+
+    Verify the data item's reference counters are decremented by one compared to when added to the list.
+    (technically, this could be accomplished by checking memory leaks too, but I checked anyway)
+    */
+
+    for (int i=0;i<15;i++) {
+        if (psMemGetRefCounter(data[i]) != 1) {
+            psError(__func__,"pslistFree didn't decrement the data item's reference counter");
+            return 3;
+        }
+        psFree(data[i]);
+    }
 
     return 0;
Index: /trunk/psLib/test/collections/verified/tst_psList.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psList.stderr	(revision 959)
+++ /trunk/psLib/test/collections/verified/tst_psList.stderr	(revision 960)
@@ -47,7 +47,7 @@
  <DATE> <TIME> <HOST> |E|psListRemove   |Couldn't position to given index (-2) to remove element from list.
  <DATE> <TIME> <HOST> |I|testListRemove |Next message should be an error
- <DATE> <TIME> <HOST> |E|psListRemove   |Failed to find 0x0 on psList 0x6d7f30 in psListRemove.
+ <DATE> <TIME> <HOST> |E|psListRemove   |Failed to find 0x0 on psList 0x6d8b90 in psListRemove.
  <DATE> <TIME> <HOST> |I|testListRemove |Next message should be an error
- <DATE> <TIME> <HOST> |E|psListRemove   |Failed to find 0x6d8840 on psList 0x6d7f30 in psListRemove.
+ <DATE> <TIME> <HOST> |E|psListRemove   |Failed to find 0x6d94a0 on psList 0x6d8b90 in psListRemove.
 
 ---> TESTPOINT PASSED (psList{490-testListRemove} | tst_psList.c)
@@ -76,2 +76,11 @@
 ---> TESTPOINT PASSED (psList{494-testListIterator} | tst_psList.c)
 
+/----------------------------- TESTPOINT ------------------------------------------\
+|             TestFile: tst_psList.c                                               |
+|            TestPoint: psList{627-testListFree}                                   |
+|             TestType: Positive                                                   |
+\----------------------------------------------------------------------------------/
+
+
+---> TESTPOINT PASSED (psList{627-testListFree} | tst_psList.c)
+
