Index: /trunk/psLib/test/collections/tst_psDlist.c
===================================================================
--- /trunk/psLib/test/collections/tst_psDlist.c	(revision 879)
+++ /trunk/psLib/test/collections/tst_psDlist.c	(revision 879)
@@ -0,0 +1,113 @@
+/** @file  tst_psDlist.c
+ *
+ *  @brief Contains the tests for psDlist.[ch]
+ *
+ *
+ *  @author Robert DeSonia, MHPCC
+ *
+ *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-06-04 23:50:23 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ */
+
+#include "psTest.h"
+#include "pslib.h"
+
+static int testDlistAlloc(void);
+
+testDescription tests[] = {
+                              {testDlistAlloc,"487-testDlistAlloc",0},
+                              {NULL}
+                          };
+
+int main()
+{
+    psSetLogLevel(PS_LOG_INFO);
+
+    testDlistAlloc();
+
+    if (! runTestSuite(stderr,"psDlist",tests)) {
+        psAbort(__FILE__,"One or more tests failed");
+    }
+    return 0;
+}
+
+int testDlistAlloc(void)
+{
+    int currentId = psMemGetId();
+    psDlist* list;
+    int ref;
+    float* data;
+
+    psLogMsg(__func__,PS_LOG_INFO,"psDlistAlloc shall create a psDlist with either 0 or 1 element.");
+
+    data = psAlloc(sizeof(float));
+
+    // if psDlistAlloc is invoked with a NULL parameter, it shall return an
+    // empty psDlist struct with head=tail=NULL and n=0. Otherwise, it shall
+    // return a psDlist of one element (head=tail=data, n=1).
+
+    list = psDlistAlloc(NULL);
+    if (list == NULL) {
+        psError(__func__,"psDlistAlloc failed to return a list.");
+        return 1;
+    }
+
+    if (list->head != NULL || list->tail != NULL) {
+        psError(__func__,"head and/or tail was not NULL for empty list.");
+        return 2;
+    }
+
+    if (list->size != 0) {
+        psError(__func__,"size of list wasn't zero for empty list.");
+        return 3;
+    }
+
+    psDlistFree(list,NULL);
+
+    list = psDlistAlloc(data);
+    if (list == NULL) {
+        psError(__func__,"psDlistAlloc failed to return a list.");
+        return 4;
+    }
+
+    if (list->head == NULL || list->tail == NULL) {
+        psError(__func__,"head and/or tail was NULL for one-element new list.");
+        return 5;
+    }
+
+    if (list->head->data != data || list->tail->data != data) {
+        psError(__func__,"head and/or tail didn't point to data's node for one-element new list.");
+        return 6;
+    }
+
+    if (list->size != 1) {
+        psError(__func__,"size of list wasn't correctly set for new, one-element list.");
+        return 7;
+    }
+
+    ref = psMemGetRefCounter(data);
+    if (ref != 2) {
+        psError(__func__,"psDlist didn't increment reference count of data (%d.",ref);
+        return 8;
+    }
+
+
+    psDlistFree(list,PS_FREE);
+
+    psMemCheckLeaks(currentId,NULL,NULL);
+    psMemCheckCorruption(1);
+
+    return 0;
+}
+
+int testpsDlistAdd(void)
+{
+
+    psLogMsg(__func__,PS_LOG_INFO,"psDlistAdd shall add an element to list");
+
+
+
+    return 0;
+}
