Index: trunk/psModules/test/imsubtract/tst_pmSubtractBias.c
===================================================================
--- trunk/psModules/test/imsubtract/tst_pmSubtractBias.c	(revision 5552)
+++ trunk/psModules/test/imsubtract/tst_pmSubtractBias.c	(revision 5587)
@@ -25,6 +25,6 @@
  *  XXX: Memory leaks are not being detected.
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-11-19 00:55:18 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-11-23 23:54:30 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -52,4 +52,6 @@
                           };
 
+psS32 currentId = 0;
+psS32 memLeaks = 0;             // XXX: remove
 
 int main(int argc, char* argv[])
@@ -67,4 +69,10 @@
     psTraceSetLevel("psSpline1DEval", 0);
     psTraceSetLevel("psSpline1DEvalVector", 0);
+
+    psS32 currentId = psMemGetId(); // XXX: remove
+    psS32 memLeaks = 0;             // XXX: remove
+    if (0) {
+        PRINT_MEMLEAKS(0);
+    }
 
     return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv);
@@ -661,43 +669,37 @@
     }
     oAverage/= (psF32) numOverscans;
-
-
-    if (fit == PM_FIT_NONE) {
-        myReadout = pmSubtractBias(myReadout, NULL, PM_FIT_NONE, overscanaxis,
-                                   stat, nBin, NULL, NULL);
-    } else if (fit == PM_FIT_POLYNOMIAL) {
-        myReadout = pmSubtractBias(myReadout, myPoly, PM_FIT_POLYNOMIAL, overscanaxis,
-                                   stat, nBin, NULL, NULL);
-    } else if (fit == PM_FIT_SPLINE) {
-        //        mySpline = psSpline1DAlloc();
-        myReadout = pmSubtractBias(myReadout, mySpline, PM_FIT_SPLINE, overscanaxis,
-                                   stat, nBin, NULL, NULL);
-    }
-
-    for (i=0;i<imageNumRows;i++) {
-        for (j=0;j<imageNumCols;j++) {
-            expect = ((float) (i + j)) - oAverage;
-            actual = myReadout->image->data.F32[i][j];
-            if (FLT_EPSILON < fabs(expect - actual)) {
-                printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
-                testStatus = 1;
-            } else {
-                //printf("COOL: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
+    if (0) {
+        if (fit == PM_FIT_NONE) {
+            myReadout = pmSubtractBias(myReadout, NULL, PM_FIT_NONE, overscanaxis,
+                                       stat, nBin, NULL, NULL);
+        } else if (fit == PM_FIT_POLYNOMIAL) {
+            myReadout = pmSubtractBias(myReadout, myPoly, PM_FIT_POLYNOMIAL, overscanaxis,
+                                       stat, nBin, NULL, NULL);
+        } else if (fit == PM_FIT_SPLINE) {
+            //        mySpline = psSpline1DAlloc();
+            myReadout = pmSubtractBias(myReadout, mySpline, PM_FIT_SPLINE, overscanaxis,
+                                       stat, nBin, NULL, NULL);
+        }
+        if (myReadout == NULL ) {
+            printf("TEST ERROR: pmSubtractBias() returned NULL.\n");
+            testStatus = 1;
+        } else {
+            for (i=0;i<imageNumRows;i++) {
+                for (j=0;j<imageNumCols;j++) {
+                    expect = ((float) (i + j)) - oAverage;
+                    actual = myReadout->image->data.F32[i][j];
+                    if (FLT_EPSILON < fabs(expect - actual)) {
+                        printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
+                        testStatus = 1;
+                    } else {
+                        //printf("GOOD: image[%d][%d] is %f, should be %f\n", i, j, actual, expect);
+                    }
+                }
             }
         }
     }
-    // XXX: Figure out memory deallocation
+
+    // HEY
     psFree(fpa);
-    //    psFree(chip);
-    //    psFree(cell);
-    /*
-        psListElem *tmpElem = (psListElem *) myReadout->bias->head;
-        while (NULL != tmpElem) {
-            psFree((psImage *) tmpElem->data);
-            tmpElem = tmpElem->next;
-        }
-        psFree(myReadout);
-    */
-    psFree(camera);
     psFree(stat);
     psFree(myPoly);
@@ -1126,4 +1128,2 @@
 }
 
-
-// This code will
