Index: /trunk/psLib/test/dataManip/Makefile
===================================================================
--- /trunk/psLib/test/dataManip/Makefile	(revision 1781)
+++ /trunk/psLib/test/dataManip/Makefile	(revision 1782)
@@ -3,6 +3,6 @@
 ##  Makefile:   test/sysUtils
 ##
-##  $Revision: 1.36 $  $Name: not supported by cvs2svn $
-##  $Date: 2004-09-10 02:55:20 $
+##  $Revision: 1.37 $  $Name: not supported by cvs2svn $
+##  $Date: 2004-09-10 22:52:22 $
 ##
 ##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -25,4 +25,5 @@
 tst_psFunc03 \
 tst_psFunc04 \
+tst_psFunc05 \
 tst_psHist00 \
 tst_psHist01 \
Index: /trunk/psLib/test/dataManip/tst_psFunc04.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psFunc04.c	(revision 1781)
+++ /trunk/psLib/test/dataManip/tst_psFunc04.c	(revision 1782)
@@ -1,9 +1,13 @@
 /*****************************************************************************
-    This routine must ensure that the psSpline1DAlloc() function properly
-    allocates the spline data structure.
+    This routine must ensure that the psSpline1DEval() function works
+    properly.  It creates a spline with psSpline1DAlloc(), creates a set of
+    data values, sets the spline polynomials with psSpline1DGen(), then
+    calls psSpline1DEval() on new data values and ensures that the results
+    are correct.
  
     XXX: figure out the memory deallocator
  *****************************************************************************/
 #include <stdio.h>
+#include <math.h>
 #include "pslib.h"
 #include "psTest.h"
@@ -18,5 +22,6 @@
     int memLeaks=0;
     int i;
-    float tmp;
+    float x;
+    float y;
     //    int  currentId = psMemGetId();
     psSpline1D *tmpSpline;
@@ -33,9 +38,4 @@
     tmpSpline = psSpline1DAlloc(N, 1, 1.0, 10.0);
 
-
-    for (i=0;i<N+1;i++) {
-        printf("tmpSpline->domains[%d] is %f\n", i, tmpSpline->domains[i]);
-    }
-
     for (i=0;i<N+1;i++) {
         data->data.F32[i] = tmpSpline->domains[i];
@@ -44,6 +44,10 @@
     psSpline1DGen(tmpSpline, data);
     for (i=0;i<N+1;i++) {
-        tmp = psSpline1DEval(tmpSpline, (float) i+1);
-        printf("%f -> %f\n", (float) i+1, tmp);
+        x = 0.5 + (float) i+1;
+        y = psSpline1DEval(tmpSpline, x);
+        if (fabs(x-y) > FLT_EPSILON) {
+            printf("ERROR: f(%f) is %f\n", x, y);
+            testStatus = true;
+        }
     }
 
Index: /trunk/psLib/test/dataManip/tst_psFunc05.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psFunc05.c	(revision 1782)
+++ /trunk/psLib/test/dataManip/tst_psFunc05.c	(revision 1782)
@@ -0,0 +1,74 @@
+/*****************************************************************************
+    This routine must ensure that the psSpline1DEval() function works
+    properly.  It creates a spline with psSpline1DAlloc(), creates a set of
+    data values, sets the spline polynomials with psSpline1DGen(), then
+    calls psSpline1DEval() on new data values and ensures that the results
+    are correct.
+ 
+    XXX: figure out the memory deallocator
+ *****************************************************************************/
+#include <stdio.h>
+#include <math.h>
+#include "pslib.h"
+#include "psTest.h"
+#include "psMemory.h"
+#include "psFunctions.h"
+
+#define N 8
+
+int main()
+{
+    int testStatus = true;
+    int memLeaks=0;
+    int i;
+    //    int  currentId = psMemGetId();
+    psSpline1D *tmpSpline;
+    psVector *data;
+    psVector *x;
+    psVector *y;
+
+    psTraceSetLevel(".", 0);
+    /****************************************************************************/
+    /****************************************************************************/
+    testStatus = true;
+    printPositiveTestHeader(stdout,
+                            "psFunction functions",
+                            "psSpline1DAlloc()");
+    data = psVectorAlloc(N+1, PS_TYPE_F32);
+    x = psVectorAlloc(N+1, PS_TYPE_F32);
+    y = psVectorAlloc(N+1, PS_TYPE_F32);
+    tmpSpline = psSpline1DAlloc(N, 1, 1.0, 10.0);
+
+    for (i=0;i<N+1;i++) {
+        data->data.F32[i] = tmpSpline->domains[i];
+    }
+
+    psSpline1DGen(tmpSpline, data);
+
+    for (i=0;i<N+1;i++) {
+        x->data.F32[i] = 0.5 + (float) i+1;
+    }
+
+    y = psSpline1DEvalVector(x, tmpSpline);
+
+    for (i=0;i<N+1;i++) {
+        if (fabs(x->data.F32[i]-y->data.F32[i]) > FLT_EPSILON) {
+            printf("ERROR: f(%f) is %f\n", x->data.F32[i], y->data.F32[i]);
+            testStatus = true;
+        }
+    }
+
+    psFree(tmpSpline);
+    psMemCheckCorruption(1);
+    //    memLeaks = psMemCheckLeaks(currentId,NULL,NULL);
+    if (0 != memLeaks) {
+        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
+    }
+
+    printFooter(stdout,
+                "psFunctions functions",
+                "psSpline1DAlloc()",
+                testStatus);
+
+    return (!testStatus);
+}
