Index: trunk/psLib/test/mathtypes/tap_psImage.c
===================================================================
--- trunk/psLib/test/mathtypes/tap_psImage.c	(revision 11398)
+++ trunk/psLib/test/mathtypes/tap_psImage.c	(revision 11402)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-12-18 19:10:56 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-01-30 00:52:07 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -24,11 +24,10 @@
 
 
-static int Okay = 1;
-
-static int setOkay( int okay )
-{
-    Okay = okay;
-    return okay;
-}
+//static int Okay = 1;
+//static int setOkay( int okay )
+//{
+//    Okay = okay;
+//    return okay;
+//}
 
 #define OK(exp) \
@@ -45,5 +44,5 @@
 int main(int argc, char* argv[])
 {
-    plan_tests(1449971);
+    plan_tests(383);
 
     void testImageAlloc(void);
@@ -149,12 +148,14 @@
                         }
                     }
-                    for (psS32 r=0;r<rows;r++) {
-                        for (psS32 c=0;c<cols;c++) {
-                            ok (OK(image->data.U16[r][c] == 2*c+r),
-                                "Could not set all pixels in uint16 image at "
-                                "(%d,%d)",c,r);
-                            RET_OK
-                        }
-                    }
+                    bool errorFlag = false;
+                    for (psS32 r=0;r<rows;r++) {
+                        for (psS32 c=0;c<cols;c++) {
+                            if (image->data.U16[r][c] != 2*c+r) {
+                                diag("ERROR: Could not set all pixels in uint16 image at (%d,%d)",c,r);
+                                errorFlag = true;
+                            }
+                        }
+                    }
+                    ok(!errorFlag, "psImageAlloc() set data correctly (U16)");
                 }
                 break;
@@ -168,11 +169,14 @@
                         }
                     }
-                    for (psS32 r=0;r<rows;r++) {
-                        for (psS32 c=0;c<cols;c++) {
-                            ok (OK(!(fabsf(image->data.F32[r][c] - (2.0f*c+r)) > FLT_EPSILON)),
-                                "Set all pixels in float image at (%d,%d)",c,r);
-                            RET_OK
-                        }
-                    }
+                    bool errorFlag = false;
+                    for (psS32 r=0;r<rows;r++) {
+                        for (psS32 c=0;c<cols;c++) {
+                            if (fabsf(image->data.F32[r][c] - (2.0f*c+r)) > FLT_EPSILON) {
+                                diag("Could not set all pixels in float image at (%d,%d)",c,r);
+                                errorFlag = true;
+                            }
+                        }
+                    }
+                    ok(!errorFlag, "psImageAlloc() set data correctly (F32)");
                 }
                 break;
@@ -186,11 +190,14 @@
                         }
                     }
-                    for (psS32 r=0;r<rows;r++) {
-                        for (psS32 c=0;c<cols;c++) {
-                            ok (OK(!(fabs(image->data.F64[r][c] - (2.0f*c+r)) > DBL_EPSILON)),
-                                "Set all pixels in double image at (%d,%d)",c,r);
-                            RET_OK
-                        }
-                    }
+                    bool errorFlag = false;
+                    for (psS32 r=0;r<rows;r++) {
+                        for (psS32 c=0;c<cols;c++) {
+                            if (fabs(image->data.F64[r][c] - (2.0f*c+r)) > DBL_EPSILON) {
+                                diag("Set all pixels in double image at (%d,%d)",c,r);
+                                errorFlag = true;
+                            }
+                        }
+                    }
+                    ok(!errorFlag, "psImageAlloc() set data correctly (F64)");
                 }
                 break;
@@ -204,12 +211,15 @@
                         }
                     }
-                    for (psS32 r=0;r<rows;r++) {
-                        for (psS32 c=0;c<cols;c++) {
-                            ok (OK(!(fabsf(crealf(image->data.C32[r][c]) - r) > FLT_EPSILON ||
-                                     fabsf(cimagf(image->data.C32[r][c]) - c) > FLT_EPSILON )),
-                                "Set all pixels in complex image at (%d,%d)",c,r);
-                            RET_OK
-                        }
-                    }
+                    bool errorFlag = false;
+                    for (psS32 r=0;r<rows;r++) {
+                        for (psS32 c=0;c<cols;c++) {
+                            if(fabsf(crealf(image->data.C32[r][c]) - r) > FLT_EPSILON ||
+                                    fabsf(cimagf(image->data.C32[r][c]) - c) > FLT_EPSILON) {
+                                diag("Set all pixels in complex image at (%d,%d)",c,r);
+                                errorFlag = true;
+                            }
+                        }
+                    }
+                    ok(!errorFlag, "psImageAlloc() set data correctly (C32)");
                 }
                 break;
@@ -224,12 +234,15 @@
                         }
                     }
-                    for (psS32 r=0;r<rows;r++) {
-                        for (psS32 c=0;c<cols;c++) {
-                            ok (OK(!(image->data.U8[r][c] != (uint8_t)(r + c))),
-                                "Set all pixels in image (type=%d) at (%d,%d)",
-                                type[t],c,r);
-                            RET_OK
-                        }
-                    }
+                    bool errorFlag = false;
+                    for (psS32 r=0;r<rows;r++) {
+                        for (psS32 c=0;c<cols;c++) {
+                            if (image->data.U8[r][c] != (uint8_t)(r + c)) {
+                                diag("Set all pixels in image (type=%d) at (%d,%d)",
+                                     type[t],c,r);
+                                errorFlag = true;
+                            }
+                        }
+                    }
+                    ok(!errorFlag, "psImageAlloc() set data correctly (default)");
                 }
             }
