Index: trunk/psModules/test/tst_pmReadoutCombine.c
===================================================================
--- trunk/psModules/test/tst_pmReadoutCombine.c	(revision 2829)
+++ trunk/psModules/test/tst_pmReadoutCombine.c	(revision 2832)
@@ -5,8 +5,17 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-12-27 20:14:29 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-12-27 23:16:51 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ *
+ *  XXX: Untested:
+ * S16, S32 types
+ * Multiple input readouts with varying sizes and offsets.
+ * params->fracLow and params->fracHigh
+ * params->nKeep
+ * (gain > 0.0) && (readnoise >= 0.0) (applyZeroScale == true)
+ * (gain > 0.0) && (readnoise >= 0.0) (applyZeroScale == false)
+ *
  */
 
@@ -23,6 +32,6 @@
 
 #define NUM_READOUTS  10
-#define INPUT_NUM_ROWS 10
-#define INPUT_NUM_COLS 10
+#define INPUT_NUM_ROWS 20
+#define INPUT_NUM_COLS 20
 #define VEC_ZERO 1.0
 #define VEC_SCALE 2.0
@@ -50,5 +59,10 @@
 }
 
-int doit()
+/******************************************************************************
+simpleCombineNoOverlap(): this routine creates a list of NUM_READOUTS input
+readouts and calls pmReadoutCombine().
+ *****************************************************************************/
+
+int simpleCombineNoOverlap(psS32 numInputCols, psS32 numInputRows)
 {
     int i;
@@ -94,6 +108,6 @@
         baseRows[r] = 0;
         baseCols[r] = 0;
-        numRows[r] = INPUT_NUM_ROWS;
-        numCols[r] = INPUT_NUM_COLS;
+        numRows[r] = numInputRows;
+        numCols[r] = numInputCols;
 
         psImage *tmpImage = psImageAlloc(numCols[r], numRows[r], PS_TYPE_F32);
@@ -146,5 +160,8 @@
     int testStatus = 0;
 
-    testStatus |= doit();
+    testStatus |= simpleCombineNoOverlap(1, 1);
+    testStatus |= simpleCombineNoOverlap(INPUT_NUM_COLS, 1);
+    testStatus |= simpleCombineNoOverlap(1, INPUT_NUM_ROWS);
+    testStatus |= simpleCombineNoOverlap(INPUT_NUM_COLS, INPUT_NUM_ROWS);
 
     return(testStatus);
@@ -345,4 +362,17 @@
 
     printf("----------------------------------------------------------------------------\n");
+    printf("Calling pmReadoutCombine() row0/col0 too large.  Should generate error, return NULL.\n");
+    output = psImageAlloc(1, 1, PS_TYPE_F32);
+    *(psS32*)&output->row0 = 10000;
+    *(psS32*)&output->col0 = 10000;
+    rc = pmReadoutCombine(output, list, params, zero, scale, true, 0.0, 0.0);
+    if (rc != NULL) {
+        printf("ERROR: pmReadoutCombine() did not return NULL\n");
+        testStatus = false;
+    }
+    psFree(output);
+    output = NULL;
+
+    printf("----------------------------------------------------------------------------\n");
     printf("Calling pmReadoutCombine() with NULL input list.  Should generate error, return NULL.\n");
     rc = pmReadoutCombine(output, NULL, params, zero, scale, true, 0.0, 0.0);
