Index: trunk/psLib/test/dataManip/tst_psFunc04.c
===================================================================
--- trunk/psLib/test/dataManip/tst_psFunc04.c	(revision 1946)
+++ trunk/psLib/test/dataManip/tst_psFunc04.c	(revision 1982)
@@ -17,5 +17,5 @@
 #define N 8
 
-int main()
+int t00()
 {
     int testStatus = true;
@@ -68,2 +68,60 @@
     return (!testStatus);
 }
+
+int t01()
+{
+    int testStatus = true;
+    int memLeaks=0;
+    int i;
+    float x;
+    float y;
+    int  currentId = psMemGetId();
+    psSpline1D *tmpSpline;
+    psVector *data;
+
+    psTraceSetLevel(".", 0);
+
+    /****************************************************************************/
+    /****************************************************************************/
+    testStatus = true;
+    printPositiveTestHeader(stdout,
+                            "psFunction functions",
+                            "psSpline1DAlloc()");
+    data = 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];
+    }
+    psVectorFitSpline1D(tmpSpline, data, data, NULL);
+
+    for (i=0;i<N+1;i++) {
+        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;
+        }
+    }
+
+    p_psSpline1DFree(tmpSpline);
+    psMemCheckCorruption(1);
+    psFree(data);
+    memLeaks = psMemCheckLeaks(currentId,NULL,stderr);
+    if (0 != memLeaks) {
+        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
+    }
+
+    printFooter(stdout,
+                "psFunctions functions",
+                "psSpline1DAlloc()",
+                testStatus);
+
+    return (!testStatus);
+}
+
+int main()
+{
+    t00();
+    //    t01();
+}
