Index: trunk/psLib/test/mathtypes/tst_psImage.c
===================================================================
--- trunk/psLib/test/mathtypes/tst_psImage.c	(revision 7546)
+++ trunk/psLib/test/mathtypes/tst_psImage.c	(revision 7579)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-03-14 03:25:48 $
+ *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-15 02:29:12 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -361,10 +361,10 @@
 {
     psImage *image = NULL;
-    image = psImageAlloc(5, 5, PS_TYPE_S32);
+    image = psImageAlloc(5, 4, PS_TYPE_S32);
 
     //Set the position of the subimage relative to the parent.
     image->col0 = 10;
     image->row0 = 10;
-    for (int i = 0; i < 5; i++) {
+    for (int i = 0; i < 4; i++) {
         for (int j = 0; j < 5; j++) {
             image->data.S32[i][j] = i+j;
@@ -419,11 +419,12 @@
 
     //Try to set a position inside of the subimage.
-    if ( !psImageSet(image, 13, 14, 666) ) {
+    if ( !psImageSet(image, 14, 12, 666) ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                 "psImageSet failed to return true when passed valid parameters.\n");
         return 6;
-    } else if (image->data.S32[3][4] != 666) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
-                "psImageSet failed to set the data values correctly.\n");
+    }
+    if (image->data.S32[2][4] != 666) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+                "psImageSet failed to set the data values correctly. value=%d\n", image->data.S32[2][4]);
         return 7;
     }
@@ -433,8 +434,8 @@
                 "psImageSet failed to return true when passed valid parameters.\n");
         return 8;
-    } else if  (image->data.S32[4][4] != 666) {
+    } else if  (image->data.S32[3][4] != 666) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                 "psImageSet failed to set (from the tail) the data values correctly.\n");
-        printf("\n value at 14,14 is %d\n", image->data.S32[4][4]);
+        printf("\n value at 14,14 is %d\n", image->data.S32[3][4]);
         return 9;
     }
@@ -477,10 +478,10 @@
 {
     psImage *image = NULL;
-    image = psImageAlloc(5, 5, PS_TYPE_S32);
+    image = psImageAlloc(5, 3, PS_TYPE_S32);
 
     //Set the position of the subimage relative to the parent.
     image->col0 = 10;
     image->row0 = 10;
-    for (int i = 0; i < 5; i++) {
+    for (int i = 0; i < 3; i++) {
         for (int j = 0; j < 5; j++) {
             image->data.S32[i][j] = i+j;
@@ -535,5 +536,5 @@
 
     //Try to get a position inside of the subimage.
-    if ( psImageGet(image, 13, 14) != 7 ) {
+    if ( psImageGet(image, 14, 12) != 6 ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                 "psImageGet failed to return the correct value.\n");
@@ -541,5 +542,5 @@
     }
     //Try to get a position inside of the subimage from the tail.
-    if ( psImageGet(image, -1, -1) != 8 ) {
+    if ( psImageGet(image, -1, -1) != 6 ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                 "psImageGet failed to return the correct value.\n");
@@ -549,5 +550,5 @@
     //Try to get a position outside of the subimage but inside of the parent image.
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    if ( isnan( psImageGet(image, 1, 1) ) ) {
+    if ( !isnan( psImageGet(image, 1, 1) ) ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, false,
                 "psImageGet failed to return NAN when passed an invalid location.\n");
@@ -555,5 +556,5 @@
     }
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    if ( isnan( psImageGet(image, 9, 10) ) ) {
+    if ( !isnan( psImageGet(image, 9, 10) ) ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, false,
                 "psImageGet failed to return NAN when passed an invalid location.\n");
@@ -563,5 +564,5 @@
     //Try to set a position outside of the subimage.
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    if ( isnan( psImageGet(image, 15, 14) ) ) {
+    if ( !isnan( psImageGet(image, 15, 14) ) ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, false,
                 "psImageGet failed to return NAN when passed an invalid location.\n");
@@ -570,5 +571,5 @@
     //Try to set a position outside of the subimage, indexing from the tail.
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message");
-    if ( isnan( psImageGet(image, -6, -1) ) ) {
+    if ( !isnan( psImageGet(image, -6, -1) ) ) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, false,
                 "psImageGet failed to return NAN when passed an invalid location.\n");
