Index: trunk/psLib/test/dataManip/tst_psFunc03.c
===================================================================
--- trunk/psLib/test/dataManip/tst_psFunc03.c	(revision 1811)
+++ trunk/psLib/test/dataManip/tst_psFunc03.c	(revision 1946)
@@ -3,5 +3,4 @@
     allocates the spline data structure.
  
-    XXX: figure out the memory deallocator
     XXX: test bounds?
  *****************************************************************************/
@@ -13,4 +12,6 @@
 
 #define N 10
+#define LINEAR 1
+#define CUBIC 3
 
 int main()
@@ -19,5 +20,5 @@
     int memLeaks=0;
     int i;
-    //    int  currentId = psMemGetId();
+    int  currentId = psMemGetId();
     psSpline1D *tmpSpline;
     psVector *bounds;
@@ -28,5 +29,5 @@
     printPositiveTestHeader(stdout,
                             "psFunction functions",
-                            "psSpline1DAlloc()");
+                            "psSpline1DAllocGeneric(): linear");
     bounds = psVectorAlloc(N+1, PS_TYPE_F32);
     for (i=0;i<N+1;i++) {
@@ -34,5 +35,5 @@
     }
 
-    tmpSpline = psSpline1DAllocGeneric(bounds, 1);
+    tmpSpline = psSpline1DAllocGeneric(bounds, LINEAR);
     if (tmpSpline == NULL) {
         printf("ERROR: Could not allocate psSpline1D data structure\n");
@@ -54,5 +55,5 @@
             testStatus = false;
         }
-        if ((tmpSpline->spline[i])->n != 2) {
+        if ((tmpSpline->spline[i])->n != LINEAR+1) {
             printf("ERROR: Spline created with order %d\n", (tmpSpline->spline[i])->n);
             testStatus = false;
@@ -71,7 +72,8 @@
     }
 
-    psFree(tmpSpline);
+    p_psSpline1DFree(tmpSpline);
+    psFree(bounds);
     psMemCheckCorruption(1);
-    //    memLeaks = psMemCheckLeaks(currentId,NULL,stderr);
+    memLeaks = psMemCheckLeaks(currentId,NULL,stderr);
     if (0 != memLeaks) {
         psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
@@ -80,5 +82,5 @@
     printFooter(stdout,
                 "psFunctions functions",
-                "psSpline1DAlloc()",
+                "psSpline1DAllocGeneric(): linear",
                 testStatus);
     /****************************************************************************/
@@ -87,5 +89,5 @@
     printPositiveTestHeader(stdout,
                             "psFunction functions",
-                            "psSpline1DAlloc()");
+                            "psSpline1DAllocGeneric(): cubic");
     bounds = psVectorAlloc(N+1, PS_TYPE_F32);
     for (i=0;i<N+1;i++) {
@@ -93,5 +95,5 @@
     }
 
-    tmpSpline = psSpline1DAllocGeneric(bounds, 3);
+    tmpSpline = psSpline1DAllocGeneric(bounds, CUBIC);
     if (tmpSpline == NULL) {
         printf("ERROR: Could not allocate psSpline1D data structure\n");
@@ -113,5 +115,5 @@
             testStatus = false;
         }
-        if ((tmpSpline->spline[i])->n != 4) {
+        if ((tmpSpline->spline[i])->n != CUBIC+1) {
             printf("ERROR: Spline created with order %d\n", (tmpSpline->spline[i])->n);
             testStatus = false;
@@ -130,7 +132,8 @@
     }
 
-    psFree(tmpSpline);
+    p_psSpline1DFree(tmpSpline);
+    psFree(bounds);
     psMemCheckCorruption(1);
-    //    memLeaks = psMemCheckLeaks(currentId,NULL,stderr);
+    memLeaks = psMemCheckLeaks(currentId,NULL,stderr);
     if (0 != memLeaks) {
         psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
@@ -139,5 +142,5 @@
     printFooter(stdout,
                 "psFunctions functions",
-                "psSpline1DAlloc()",
+                "psSpline1DAllocGeneric(): cubic",
                 testStatus);
 
