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;
+        }
     }
 
