Index: trunk/psModules/test/tst_pmFlatField.c
===================================================================
--- trunk/psModules/test/tst_pmFlatField.c	(revision 2950)
+++ trunk/psModules/test/tst_pmFlatField.c	(revision 4770)
@@ -16,8 +16,11 @@
  *    Test M - Attempt to use non-mask type mask image
  *
+ * XXX: Added a mask argument to pmFlatField().  Must add tests.  For now, all
+ * masks are NULL.
+ *
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-11 01:17:28 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-16 01:10:36 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -68,4 +71,5 @@
 int main(int argc, char* argv[])
 {
+    psLogSetFormat("HLNM");
     return !runTestSuite(stderr, "Test Point Driver", tests, argc, argv);
 }
@@ -77,12 +81,12 @@
     printPositiveTestHeader(stdout, "pmFlatField", "Test A - Divide input image by flat image");
     CREATE_AND_SET_IMAGE(inImage,F64,6.0,3,3)
-    psReadout *inReadout = psReadoutAlloc();
+    pmReadout *inReadout = pmReadoutAlloc(NULL);
     inReadout->image = inImage;
     PRINT_MATRIX(inImage,F64,"Input image:");
     CREATE_AND_SET_IMAGE(flatImage1,F64,2.0,3,3)
-    psReadout *flatReadout = psReadoutAlloc();
+    pmReadout *flatReadout = pmReadoutAlloc(NULL);
     flatReadout->image = flatImage1;
     PRINT_MATRIX(flatImage1,F64,"Flat image:");
-    if ( !pmFlatField(inReadout, flatReadout) ) {
+    if ( !pmFlatField(inReadout, NULL, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test A - Returned false should be true");
         return 1;
@@ -99,5 +103,5 @@
     PRINT_MATRIX(flatImage2, F64, "Flat image:");
     flatReadout->image = flatImage2;
-    if ( !pmFlatField(inReadout, flatReadout) ) {
+    if ( !pmFlatField(inReadout, NULL, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test B - Returned false should be true");
         return 2;
@@ -118,5 +122,5 @@
     psFree(inReadout->mask);
     inReadout->mask = mask1;
-    if ( !pmFlatField(inReadout, flatReadout) ) {
+    if ( !pmFlatField(inReadout, NULL, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test C - Returned false should be true");
         return 3;
@@ -132,5 +136,5 @@
     printNegativeTestHeader(stdout,"pmFlatField", "Test D - Attempt to use null flat readout",
                             "Null not allowed for flat readout", 0);
-    if( pmFlatField(inReadout, NULL) ) {
+    if( pmFlatField(inReadout, NULL, NULL) ) {
         psError(PS_ERR_UNKNOWN,true,"Test D - Returned true should be false");
         return 4;
@@ -145,5 +149,5 @@
     psImage *temp = inReadout->image;
     inReadout->image = NULL;
-    if ( pmFlatField(inReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, NULL, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test E - Returned true should be false" );
         return 5;
@@ -159,5 +163,5 @@
     temp = flatReadout->image;
     flatReadout->image = NULL;
-    if ( pmFlatField(inReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, NULL, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test F - Returned true should be false" );
         return 6;
@@ -174,5 +178,5 @@
     temp = flatReadout->image;
     flatReadout->image = smallFlat;
-    if ( pmFlatField(inReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, NULL, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test G - Returned true should be false");
         return 7;
@@ -189,5 +193,5 @@
     temp = inReadout->mask;
     inReadout->mask = largeMask;
-    if ( pmFlatField(inReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, NULL, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test H - Returned true should be false");
         return 8;
@@ -203,5 +207,5 @@
     *(int*)&inReadout->col0 = 50;
     *(int*)&inReadout->row0 = 50;
-    if ( pmFlatField(inReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, NULL, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test I - Returned true should be false");
         return 9;
@@ -217,5 +221,5 @@
                             "Complex types not allowed for input image", 0);
     *(psElemType* ) & inReadout->image->type.type = PS_TYPE_C64;
-    if ( pmFlatField(inReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, NULL, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test J - Returned true should be false");
         return 10;
@@ -230,5 +234,5 @@
                             "Complex types not allowed for flat image", 0);
     *(psElemType* ) & flatReadout->image->type.type = PS_TYPE_C64;
-    if ( pmFlatField(inReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, NULL, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test K - Returned ture should be false");
         return 11;
@@ -243,5 +247,5 @@
                             "Input and flat image types differ", 0);
     *(psElemType* ) & flatReadout->image->type.type = PS_TYPE_F32;
-    if ( pmFlatField(inReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, NULL, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test L - Returned true should be false");
         return 12;
@@ -256,5 +260,5 @@
                             "Mask must be PS_TYPE_MASK type", 0);
     *(psElemType* ) & inReadout->mask->type.type = PS_TYPE_F32;
-    if ( pmFlatField(inReadout, flatReadout) ) {
+    if ( pmFlatField(inReadout, NULL, flatReadout) ) {
         psError(PS_ERR_UNKNOWN,true,"Test M - Returned true should be false");
         return 13;
