Index: /trunk/psLib/test/image/tst_psImageManip.c
===================================================================
--- /trunk/psLib/test/image/tst_psImageManip.c	(revision 1913)
+++ /trunk/psLib/test/image/tst_psImageManip.c	(revision 1914)
@@ -6,9 +6,10 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-28 00:30:32 $
+ *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-28 01:24:46 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
+
 
 #include <math.h>
@@ -601,4 +602,6 @@
     psImage* img = NULL;
     psImage* img2 = NULL;
+    psImage* img3 = NULL;
+    psImage* img4 = NULL;
     unsigned int c = 128;
     unsigned int r = 256;
@@ -700,4 +703,18 @@
         }
     }
+    img3 = psImageAlloc(c,r,PS_TYPE_S64);
+    for (unsigned row=0;row<r;row++) {
+        psS64* img3Row = img3->data.S64[row];
+        for (unsigned col=0;col<c;col++) {
+            img3Row[col] = 6.0f;
+        }
+    }
+    img4 = psImageAlloc(c,r,PS_TYPE_S64);
+    for (unsigned row=0;row<r;row++) {
+        psS64* img4Row = img4->data.S64[row];
+        for (unsigned col=0;col<c;col++) {
+            img4Row[col] = 2.0f;
+        }
+    }
 
     psLogMsg(__func__,PS_LOG_INFO,"Following should error as overlay isn't "
@@ -756,4 +773,56 @@
 
     /*
+    Verify the return integer is equal to non-zero and program execution
+    doesn't stop, if the specified operator is not =,+,-,*,/
+    */
+
+    psLogMsg(__func__,PS_LOG_INFO,"Following should error as operator is invalid");
+    retVal = psImageOverlaySection(img,img2,0,0,"$");
+    if (retVal == 0) {
+        psError(__func__,"psImageOverlaySection returned zero even though "
+                "overlay operator is invalid");
+        return 8;
+    }
+
+    /*
+    Verify the return integer is equal to non-zero and program execution
+    doesn't stop, if the specified operator is NULL
+    */
+
+    psLogMsg(__func__,PS_LOG_INFO,"Following should error as operator is invalid");
+    retVal = psImageOverlaySection(img,img2,0,0,NULL);
+    if(retVal == 0) {
+        psError(__func__,"psImageOverlaySection returned zero even though "
+                "overlay operator is NULL");
+        return 9;
+    }
+
+    /*
+    Verify the return integer is equal to non-zero and program execution 
+    doesn't stop, if overlay image is a different type than the input image
+    */
+    psLogMsg(__func__,PS_LOG_INFO,"Following should error as overlay is "
+             "a different type");
+    retVal = psImageOverlaySection(img,img3,0,0,"+");
+    if(retVal == 0) {
+        psError(__func__,"psImageOverlaySection returned zero eventhough "
+                " overlay image type is different than input image.");
+        return 10;
+    }
+
+    /*
+    Verify the return integer is equal to non-zero and program execution
+    doesn't stop, if invalid input and overlay images
+    */
+    psLogMsg(__func__,PS_LOG_INFO,"Following should error as overlay and "
+             "image are not valid for the psImageOverlaySection function.");
+    retVal = psImageOverlaySection(img3,img4,0,0,"+");
+    if(retVal == 0) {
+        psError(__func__,"psImageOverlaySection returned zero eventhough "
+                "overlay and image type are invalid type.");
+        return 11;
+    }
+
+    /*
     Verify program execution doen't stop, if the overly image contains
     zero values with division operation is specified.
@@ -769,9 +838,11 @@
         psError(__func__,"psImageOverlaySection returned non-zero when "
                 "checking divide-by-zero.");
-        return 8;
+        return 12;
     }
 
     psFree(img);
     psFree(img2);
+    psFree(img3);
+    psFree(img4);
 
     return 0;
