Index: /trunk/psLib/test/astro/tst_psCoord02.c
===================================================================
--- /trunk/psLib/test/astro/tst_psCoord02.c	(revision 6389)
+++ /trunk/psLib/test/astro/tst_psCoord02.c	(revision 6390)
@@ -6,6 +6,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-01-31 23:24:21 $
+*  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-02-09 01:21:31 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -280,11 +280,15 @@
 #define TST05_NUM_X 5.0
 #define TST05_NUM_Y 5.0
-#define TST05_X_POLY_ORDER 2
-#define TST05_Y_POLY_ORDER 2
+#define TST05_X_POLY_ORDER 3
+#define TST05_Y_POLY_ORDER 3
 #define TST05_NUM_DATA (TST05_NUM_X * TST05_NUM_Y)
+#define TST05_IGNORE 1
+#define TST05_VERBOSE 0
 /******************************************************************************
 XXX: This is only a rudimentary test of the psPlaneTransformFit() function.
 It tests a few NULL input parameter conditions, and some simple linear
 transformations.
+ 
+// HEY
  *****************************************************************************/
 psS32 test05( void )
@@ -300,28 +304,15 @@
     // We set an arbitrary non-linear transformation.
     //
-    for (psS32 x = 0 ; x < TST05_X_POLY_ORDER ; x++) {
-        for (psS32 y = 0 ; y < TST05_Y_POLY_ORDER ; y++) {
+    for (psS32 x = 0 ; x < TST05_X_POLY_ORDER+1 ; x++) {
+        for (psS32 y = 0 ; y < TST05_Y_POLY_ORDER+1 ; y++) {
             transInit->x->coeff[x][y] = (psF32)rand() / (psF32)RAND_MAX * 10.0f;
             transInit->y->coeff[x][y] = (psF32)rand() / (psF32)RAND_MAX * 10.0f;
         }
     }
-
-    // okay, for now, it's linear.
-    transInit->x->coeff[1][1] = 0.1;
-    transInit->y->coeff[1][1] = 0.1;
-
-    /*
-        //
-        // We set an arbitrary linear transformation.
-        //
-        transInit->x->coeff[0][0] = 1.0;
-        transInit->x->coeff[0][1] = 3.0;
-        transInit->x->coeff[1][0] = 2.0;
-        transInit->x->coeff[1][1] = 7.0;
-        transInit->y->coeff[0][0] = 4.0;
-        transInit->y->coeff[0][1] = 6.0;
-        transInit->y->coeff[1][0] = 5.0;
-        transInit->y->coeff[1][1] = 3.0;
-    */
+    if (TST05_VERBOSE) {
+        PS_POLY_PRINT_2D(transInit->x);
+        PS_POLY_PRINT_2D(transInit->y);
+    }
+
     //
     // We generate a grid of input data points in the x1,y1 plane, calculate the
@@ -371,23 +362,30 @@
         printf("TEST ERROR: psPlaneTransformFit() returned FALSE.\n");
         testStatus = false;
-    }
-
-    //
-    // For the initial grid of input points, we transform them to output points with
-    // the derived transformation, and verify that they are within 10%.
-    //
-
-    // XXX: We ignore endpoints.
-    for (psS32 i = 1 ; i < src->n-1 ; i++) {
-        psPlane *inData = (psPlane *) src->data[i];
-        psPlane *outData = (psPlane *) dst->data[i];
-        psPlane *outDataDeriv = psPlaneTransformApply(NULL, trans, inData);
-        if (!PS_PERCENT_COMPARE(outDataDeriv->x, outData->x, 0.20) ||
-                !PS_PERCENT_COMPARE(outDataDeriv->y, outData->y, 0.20)) {
-            printf("TEST ERROR: the derived output coords (%d) were (%f, %f) should have been (%f, %f).\n",
-                   i, outDataDeriv->x, outDataDeriv->y, outData->x, outData->y);
-            testStatus = false;
-        }
-        psFree(outDataDeriv);
+    } else {
+        if (TST05_VERBOSE) {
+            PS_POLY_PRINT_2D(trans->x);
+            PS_POLY_PRINT_2D(trans->y);
+        }
+
+        //
+        // For the initial grid of input points, we transform them to output points with
+        // the derived transformation, and verify that they are within 10%.
+        //
+
+        for (psS32 i = TST05_IGNORE ; i < src->n-TST05_IGNORE ; i++) {
+            psPlane *inData = (psPlane *) src->data[i];
+            psPlane *outData = (psPlane *) dst->data[i];
+            psPlane *outDataDeriv = psPlaneTransformApply(NULL, trans, inData);
+            if (!PS_PERCENT_COMPARE(outDataDeriv->x, outData->x, 0.20) ||
+                    !PS_PERCENT_COMPARE(outDataDeriv->y, outData->y, 0.20)) {
+                printf("TEST ERROR: the derived output coords (%d) were (%.2f, %.2f) should have been (%.2f, %.2f).\n",
+                       i, outDataDeriv->x, outDataDeriv->y, outData->x, outData->y);
+                testStatus = false;
+            } else if (TST05_VERBOSE) {
+                printf("GOOD: the derived output coords (%d) were (%.2f, %.2f) should have been (%.2f, %.2f).\n",
+                       i, outDataDeriv->x, outDataDeriv->y, outData->x, outData->y);
+            }
+            psFree(outDataDeriv);
+        }
     }
 
@@ -406,5 +404,5 @@
     A few NULL input parameter conditions.
     Several random linear transformations.
-XXX: Must test:
+XXX: Must extensively test:
     Non-linear transformations.
   *****************************************************************************/
Index: /trunk/psLib/test/astro/verified/tst_psCoord02.stderr
===================================================================
--- /trunk/psLib/test/astro/verified/tst_psCoord02.stderr	(revision 6389)
+++ /trunk/psLib/test/astro/verified/tst_psCoord02.stderr	(revision 6390)
@@ -36,5 +36,5 @@
     Unallowable operation: in is NULL.
 <HOST>|E|psPlaneTransformInvert (FILE:LINENO)
-    Error: !(nSamples >= 1) (0 1).
+    Error: !(nSamples > 0) (0 0).
 
 ---> TESTPOINT PASSED (psImage{psPlaneTransformInvert()} | tst_psCoord02.c)
