Index: trunk/psLib/test/imageops/tst_psImageMaskOps.c
===================================================================
--- trunk/psLib/test/imageops/tst_psImageMaskOps.c	(revision 5227)
+++ trunk/psLib/test/imageops/tst_psImageMaskOps.c	(revision 5254)
@@ -6,6 +6,6 @@
  *  @author David Robbins, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-10-06 02:41:07 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-08 03:51:20 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -152,5 +152,5 @@
         return 1;
     }
-    in = psImageAlloc(3, 3, PS_TYPE_MASK);
+    in = psImageAlloc(5, 5, PS_TYPE_MASK);
     //return null for incompatible image size
     test = psImageAlloc(2, 2, PS_TYPE_MASK);
@@ -161,14 +161,60 @@
         return 2;
     }
-    //return null for incompatible image type
-    test = psImageRecycle(test, 3, 3, PS_TYPE_F32);
+    //return null for incompatible out image type
+    test = psImageRecycle(test, 5, 5, PS_TYPE_F32);
     out = psImageGrowMask(test, in, maskVal, growSize, growVal);
     if (out != NULL) {
         fprintf(stderr,
-                "psImageGrowMask failed to return NULL for incompatible image type.\n");
+                "psImageGrowMask failed to return NULL for incompatible output image type.\n");
         return 3;
     }
-
-
+    //return NULL for input image that doesn't match PS_TYPE_MASK
+    in = psImageRecycle(in, 5, 5, PS_TYPE_F32);
+    out = psImageGrowMask(test, in, maskVal, growSize, growVal);
+    if (out != NULL) {
+        fprintf(stderr,
+                "psImageGrowMask failed to return NULL for incompatible input image type.\n");
+        return 4;
+    }
+    //Test for valid function (image growth)
+    in = psImageRecycle(in, 5, 5, PS_TYPE_MASK);
+    in->data.PS_TYPE_MASK_DATA[0][0] = 1;
+    in->data.PS_TYPE_MASK_DATA[0][1] = 1;
+    in->data.PS_TYPE_MASK_DATA[0][2] = 1;
+    in->data.PS_TYPE_MASK_DATA[0][3] = 1;
+    in->data.PS_TYPE_MASK_DATA[0][4] = 1;
+    in->data.PS_TYPE_MASK_DATA[1][0] = 1;
+    in->data.PS_TYPE_MASK_DATA[1][1] = 1;
+    in->data.PS_TYPE_MASK_DATA[1][2] = 2;
+    in->data.PS_TYPE_MASK_DATA[1][3] = 1;
+    in->data.PS_TYPE_MASK_DATA[1][4] = 1;
+    in->data.PS_TYPE_MASK_DATA[2][0] = 1;
+    in->data.PS_TYPE_MASK_DATA[2][1] = 1;
+    in->data.PS_TYPE_MASK_DATA[2][2] = 2;
+    in->data.PS_TYPE_MASK_DATA[2][3] = 1;
+    in->data.PS_TYPE_MASK_DATA[2][4] = 1;
+    in->data.PS_TYPE_MASK_DATA[3][0] = 1;
+    in->data.PS_TYPE_MASK_DATA[3][1] = 1;
+    in->data.PS_TYPE_MASK_DATA[3][2] = 1;
+    in->data.PS_TYPE_MASK_DATA[3][3] = 1;
+    in->data.PS_TYPE_MASK_DATA[3][4] = 2;
+    in->data.PS_TYPE_MASK_DATA[4][0] = 1;
+    in->data.PS_TYPE_MASK_DATA[4][1] = 1;
+    in->data.PS_TYPE_MASK_DATA[4][2] = 1;
+    in->data.PS_TYPE_MASK_DATA[4][3] = 1;
+    in->data.PS_TYPE_MASK_DATA[4][4] = 1;
+    maskVal = 2;
+    growSize = 1;
+    growVal = 2;
+
+    out = psImageGrowMask(out, in, maskVal, growSize, growVal);
+    //0,2 1,1 1,3 2,1 2,3 3,2 should all be 3.  All other should be unchanged.
+    for (int i = 0; i < 5; i++) {
+        printf("\n ");
+        for (int j = 0; j < 5; j++) {
+            printf("  %d,%d= %d  ", i, j, out->data.PS_TYPE_MASK_DATA[i][j]);
+        }
+    }
+    psFree(out);
     psFree(in);
     psFree(test);
Index: trunk/psLib/test/imageops/verified/tst_psImageMaskOps.stderr
===================================================================
--- trunk/psLib/test/imageops/verified/tst_psImageMaskOps.stderr	(revision 5227)
+++ trunk/psLib/test/imageops/verified/tst_psImageMaskOps.stderr	(revision 5254)
@@ -24,4 +24,6 @@
 <DATE><TIME>|<HOST>|E|psImageGrowMask (FILE:LINENO)
     Invalid out image.  Type of out does not match type of in.
+<DATE><TIME>|<HOST>|E|psImageGrowMask (FILE:LINENO)
+    Invalid input image.  Input image type must match psMaskType.
 
 ---> TESTPOINT PASSED (psImage{psImageGrowMask} | tst_psImageMaskOps.c)
Index: trunk/psLib/test/imageops/verified/tst_psImageMaskOps.stdout
===================================================================
--- trunk/psLib/test/imageops/verified/tst_psImageMaskOps.stdout	(revision 5227)
+++ trunk/psLib/test/imageops/verified/tst_psImageMaskOps.stdout	(revision 5254)
@@ -40,2 +40,8 @@
 in->data.u8 [i][j] i=2, j=1 = 1
 in->data.u8 [i][j] i=2, j=2 = 2
+
+   0,0= 1    0,1= 1    0,2= 3    0,3= 1    0,4= 1  
+   1,0= 1    1,1= 3    1,2= 2    1,3= 3    1,4= 1  
+   2,0= 1    2,1= 3    2,2= 2    2,3= 3    2,4= 3  
+   3,0= 1    3,1= 1    3,2= 3    3,3= 3    3,4= 2  
+   4,0= 1    4,1= 1    4,2= 1    4,3= 1    4,4= 3  
