Index: /trunk/psLib/test/collections/tst_psList.c
===================================================================
--- /trunk/psLib/test/collections/tst_psList.c	(revision 947)
+++ /trunk/psLib/test/collections/tst_psList.c	(revision 948)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-06-09 19:27:09 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-06-09 19:51:08 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -108,5 +108,5 @@
     psListFree(list,PS_FREE);
 
-    if (psMemCheckLeaks(currentId,NULL,NULL) != 0) {
+    if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
         psError(__func__,"Memory Leaks Detected");
         return 64;
@@ -121,5 +121,5 @@
     int currentId = psMemGetId();
     psList* list = NULL;
-    int* data;
+    int* data = NULL;
 
     psLogMsg(__func__,PS_LOG_INFO,"psListAdd shall add an element to list");
@@ -135,4 +135,7 @@
     */
 
+    data = psAlloc(sizeof(int));
+    *data = 1;
+
     //  1. list is NULL (error)
     list = psListAdd(NULL,data,PS_LIST_HEAD);
@@ -144,7 +147,6 @@
 
     //  2. data is NULL (error, list should not grow)
-    data = psAlloc(sizeof(int));
-    *data = 1;
     list = psListAlloc(data);
+    psFree(data);
     if (list->size != 1) {
         psError(__func__,"psListAlloc didn't create a list properly.");
@@ -163,5 +165,5 @@
     *data = 2;
     list = psListAdd(list,data,PS_LIST_HEAD);
-
+    psFree(data);
     // verify that the size incremented
     if (list->size != 2) {
@@ -179,5 +181,5 @@
     *data = 3;
     list = psListAdd(list,data,PS_LIST_TAIL);
-
+    psFree(data);
     // verify that the size incremented
     if (list->size != 3) {
@@ -202,7 +204,7 @@
     data = psAlloc(sizeof(int));
     *data = 4;
-
     psLogMsg(__func__,PS_LOG_INFO,"Following should warn with invalid insert location");
     list = psListAdd(list,data,-10);
+    psFree(data);
     // verify that the size incremented
     if (list->size != 4 || *(int*)list->head->data != 4) {
@@ -216,4 +218,5 @@
     *data = 5;
     list = psListAdd(list,data,1);
+    psFree(data);
     // verify that the size incremented
     if (list->size != 5 || *(int*)list->head->next->data != 5) {
@@ -226,4 +229,5 @@
     *data = 6;
     list = psListAdd(list,data,4);
+    psFree(data);
     // verify that the size incremented
     if (list->size != 6  || *(int *)list->head->next->next->next->next->data != 6) {
@@ -236,4 +240,5 @@
     *data = 7;
     list = psListAdd(list,data,2);
+    psFree(data);
     // verify that the size incremented
     if (list->size != 7  || *(int *)list->head->next->next->data != 7) {
@@ -247,4 +252,5 @@
     psLogMsg(__func__,PS_LOG_INFO,"Following should be a warning.");
     list = psListAdd(list,data,9);
+    psFree(data);
     // verify that the size incremented
     if (list->size != 8) {
@@ -256,5 +262,5 @@
     psListFree(list, PS_FREE);
 
-    if (psMemCheckLeaks(currentId,NULL,NULL) != 0) {
+    if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
         psError(__func__,"Memory Leaks Detected");
         return 64;
@@ -384,5 +390,5 @@
     psListFree(list,PS_FREE);
 
-    if (psMemCheckLeaks(currentId,NULL,NULL) != 0) {
+    if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
         psError(__func__,"Memory Leaks Detected");
         return 64;
@@ -624,5 +630,5 @@
     psListFree(list,PS_FREE);
 
-    if (psMemCheckLeaks(currentId,NULL,NULL) != 0) {
+    if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
         psError(__func__,"Memory Leaks Detected");
         return 64;
@@ -686,5 +692,5 @@
     psListFree(list,PS_FREE);
 
-    if (psMemCheckLeaks(currentId,NULL,NULL) != 0) {
+    if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
         psError(__func__,"Memory Leaks Detected");
         return 64;
@@ -703,5 +709,5 @@
     }
 
-    list = psVectorToDlist(vec);
+    list = psVectorToList(vec);
 
     if (vec->n != 15 || list->size != 15) {
@@ -738,7 +744,7 @@
     }
 
-    list = psVectorToDlist(NULL);
+    list = psVectorToList(NULL);
     if (list != NULL) {
-        psError(__func__,"psVectorToDlist didn't return NULL when given NULL");
+        psError(__func__,"psVectorToList didn't return NULL when given NULL");
         return 1;
     }
@@ -747,7 +753,7 @@
     vec = psVectorAlloc(1,PS_TYPE_PTR);
     vec->n = 0;
-    list = psVectorToDlist(vec);
+    list = psVectorToList(vec);
     if (list == NULL) {
-        psError(__func__,"psVectorToDlist didn't create an empty list from an "
+        psError(__func__,"psVectorToList didn't create an empty list from an "
                 "empty vector.");
         return 1;
@@ -759,5 +765,5 @@
     vec = psListToVector(list);
     if (vec == NULL) {
-        psError(__func__,"psVectorToDlist didn't create an empty vector from an "
+        psError(__func__,"psVectorToList didn't create an empty vector from an "
                 "empty list.");
         return 1;
@@ -766,5 +772,5 @@
     psListFree(list,PS_FREE);
 
-    if (psMemCheckLeaks(currentId,NULL,NULL) != 0) {
+    if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
         psError(__func__,"Memory Leaks Detected");
         return 64;
@@ -807,5 +813,5 @@
         *data = lcv;
         list = psListAdd(list,data,PS_LIST_TAIL);
-        psMemDecrRefCounter(data);
+        psFree(data);
     }
 
@@ -900,5 +906,7 @@
     }
 
-    if (psMemCheckLeaks(currentId,NULL,NULL) != 0) {
+    psListFree(list,PS_FREE);
+
+    if (psMemCheckLeaks(currentId,NULL,stderr) != 0) {
         psError(__func__,"Memory Leaks Detected");
         return 64;
