Index: trunk/psLib/test/image/tst_psImage.c
===================================================================
--- trunk/psLib/test/image/tst_psImage.c	(revision 2273)
+++ trunk/psLib/test/image/tst_psImage.c	(revision 2879)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-04 01:05:00 $
+ *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-04 02:34:58 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -23,4 +23,5 @@
 static psS32 testImageAlloc(void);
 static psS32 testImageCopy(void);
+static psS32 testRegion(void);
 
 testDescription tests[] = {
@@ -28,4 +29,6 @@
                               {testImageAlloc,548,"psImageFree",0,true},
                               {testImageCopy,551,"psImageCopy",0,false},
+                              {testRegion,790,"psRegionAlloc",0,false},
+                              {testRegion,791,"psRegionFromString",0,true},
                               {NULL}
                           };
@@ -394,2 +397,59 @@
 }
 
+static psS32 testRegion(void)
+{
+    int testNum = 0;
+
+
+    // Testpoint #790
+
+    psRegion* region = psRegionAlloc(1,2,3,4);
+
+    testNum++;
+    if (region == NULL) {
+        psError(PS_ERR_UNKNOWN, false,
+                "psRegionAlloc returned a NULL pointer.");
+        return testNum;
+    }
+
+    testNum++;
+    if (region->x0 != 1 || region->x1 != 2 || region->y0 != 3 || region->y1 != 4) {
+        psError(PS_ERR_UNKNOWN, false,
+                "The region attributes are not set properly (%s)",
+                psRegionToString(region));
+        return testNum;
+    }
+
+    psFree(region);
+
+    // Testpoint #791
+
+    region = psRegionFromString("[1:2,3:4]");
+
+    testNum++;
+    if (region == NULL) {
+        psError(PS_ERR_UNKNOWN, false,
+                "psRegionFromString returned a NULL pointer.");
+        return testNum;
+    }
+
+    testNum++;
+    if (region->x0 != 1 || region->x1 != 2 || region->y0 != 3 || region->y1 != 4) {
+        psError(PS_ERR_UNKNOWN, false,
+                "The region attributes are not set properly (%s)",
+                psRegionToString(region));
+        return testNum;
+    }
+
+    psFree(region);
+    region = psRegionFromString("[1:2,3:]");
+
+    testNum++;
+    if (region != NULL) {
+        psError(PS_ERR_UNKNOWN, false,
+                "psRegionFromString returned a non-NULL pointer given a malformed string.");
+        return testNum;
+    }
+
+    return 0;
+}
