Index: /trunk/psLib/test/astronomy/tst_psCoord.c
===================================================================
--- /trunk/psLib/test/astronomy/tst_psCoord.c	(revision 3365)
+++ /trunk/psLib/test/astronomy/tst_psCoord.c	(revision 3366)
@@ -6,6 +6,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-03-02 19:41:31 $
+*  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-03-02 21:03:20 $
 *
 *  XXX: THe psProject() and psDeproject() functions do not work fully.  They
@@ -22,5 +22,5 @@
 #include "pslib.h"
 static psS32 testSphereTransformAlloc( void );
-static psS32 test1b( void );
+static psS32 testPlaneTransformAlloc( void );
 static psS32 test1c( void );
 static psS32 test2( void );
@@ -44,5 +44,5 @@
 testDescription tests[] = {
                               {testSphereTransformAlloc, 819, "psSphereTransformAlloc()", 0, false},
-                              {test1b, 0000, "psPlaneTransformAlloc()", 0, false},
+                              {testPlaneTransformAlloc, 826, "psPlaneTransformAlloc()", 0, false},
                               {test1c, 0000, "psPlaneDistortAlloc()", 0, false},
                               {test2, 0000, "psPlaneTransformApply()", 0, false},
@@ -145,51 +145,64 @@
 #define NY_TERMS 4
 #define NZ_TERMS 5
-psS32 test1b( void )
-{
-    psS32 testStatus = 0;
+
+psS32 testPlaneTransformAlloc( void )
+{
+    //    psS32 testStatus = 0;
+    // Allocate psPlaneTransform with known x and y terms
     psPlaneTransform *myPT = psPlaneTransformAlloc(NX_TERMS, NY_TERMS);
 
+    // Verify returned value is not NULL
+    if(myPT == NULL) {
+        psError(PS_ERR_UNKNOWN,true,"Function returned NULL not expected.");
+        return 1;
+    }
+
+    // Verify returned transform has members set properly
     if (myPT->x->nX != NX_TERMS) {
-        printf("ERROR: myPT->x->nX is %d, should be %d\n", myPT->x->nX, NX_TERMS);
-        testStatus = 1;
+        psError(PS_ERR_UNKNOWN,true,"myPT->x->nX is %d, should be %d",
+                myPT->x->nX, NX_TERMS);
+        return 2;
     }
     if (myPT->y->nX != NX_TERMS) {
-        printf("ERROR: myPT->y->nX is %d, should be %d\n", myPT->y->nX, NX_TERMS);
-        testStatus = 1;
-    }
-
+        psError(PS_ERR_UNKNOWN,true,"myPT->y->nX is %d, should be %d",
+                myPT->y->nX, NX_TERMS);
+        return 3;
+    }
     if (myPT->x->nY != NY_TERMS) {
-        printf("ERROR: myPT->x->nY is %d, should be %d\n", myPT->x->nY, NY_TERMS);
-        testStatus = 1;
+        psError(PS_ERR_UNKNOWN,true,"myPT->x->nY is %d, should be %d",
+                myPT->x->nY, NY_TERMS);
+        return 4;
     }
     if (myPT->y->nY != NY_TERMS) {
-        printf("ERROR: myPT->y->nY is %d, should be %d\n", myPT->y->nY, NY_TERMS);
-        testStatus = 1;
-    }
+        psError(PS_ERR_UNKNOWN,true,"myPT->y->nY is %d, should be %d",
+                myPT->y->nY, NY_TERMS);
+        return 5;
+    }
+
+    // Free plane transform
     psFree(myPT);
 
-    printf("-------------------------------------------------------------------\n");
-    printf("Calling psPlaneTransformAlloc() with negative-order polynomial request.  Should generate error, return NULL.\n");
+    // Attempt to specify negative x terms and verify NULL returned and errror message generated
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message: negative x terms");
     myPT = psPlaneTransformAlloc(-1.0, 1.0);
     if (myPT != NULL) {
-        printf("TEST ERROR: psPlaneTransformAlloc() did not return NULL.\n");
-        testStatus = false;
-        myPT = NULL;
-    }
-
-    printf("-------------------------------------------------------------------\n");
-    printf("Calling psPlaneTransformAlloc() with negative-order polynomial request.  Should generate error, return NULL.\n");
+        psError(PS_ERR_UNKNOWN,true,"psPlaneTransformAlloc() did not return NULL.");
+        return 6;
+    }
+
+    // Attempt to specify negative y terms and verify NULL returned and error message generated
+    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message: negative y terms");
     myPT = psPlaneTransformAlloc(1.0, -1.0);
     if (myPT != NULL) {
-        printf("TEST ERROR: psPlaneTransformAlloc() did not return NULL.\n");
-        testStatus = false;
-        myPT = NULL;
-    }
-    printf("-------------------------------------------------------------------\n");
-
+        psError(PS_ERR_UNKNOWN,true,"psPlaneTransformAlloc() did not return NULL.");
+        return 7;
+    }
 
     psFree(myPT);
-    return(testStatus);
-}
+
+    return 0;
+}
+
+
 psS32 test1c( void )
 {
Index: /trunk/psLib/test/astronomy/verified/tst_psCoord.stderr
===================================================================
--- /trunk/psLib/test/astronomy/verified/tst_psCoord.stderr	(revision 3365)
+++ /trunk/psLib/test/astronomy/verified/tst_psCoord.stderr	(revision 3366)
@@ -14,6 +14,10 @@
 \**********************************************************************************/
 
+<DATE><TIME>|<HOST>|I|testPlaneTransformAlloc
+    Following should generate an error message: negative x terms
 <DATE><TIME>|<HOST>|E|psPlaneTransformAlloc (FILE:LINENO)
     Error: n1 is less than 0.
+<DATE><TIME>|<HOST>|I|testPlaneTransformAlloc
+    Following should generate an error message: negative y terms
 <DATE><TIME>|<HOST>|E|psPlaneTransformAlloc (FILE:LINENO)
     Error: n2 is less than 0.
Index: /trunk/psLib/test/astronomy/verified/tst_psCoord.stdout
===================================================================
--- /trunk/psLib/test/astronomy/verified/tst_psCoord.stdout	(revision 3365)
+++ /trunk/psLib/test/astronomy/verified/tst_psCoord.stdout	(revision 3366)
@@ -1,7 +1,2 @@
--------------------------------------------------------------------
-Calling psPlaneTransformAlloc() with negative-order polynomial request.  Should generate error, return NULL.
--------------------------------------------------------------------
-Calling psPlaneTransformAlloc() with negative-order polynomial request.  Should generate error, return NULL.
--------------------------------------------------------------------
 -------------------------------------------------------------------
 Calling psPlaneDistortAlloc() with negative-order polynomial request.  Should generate error, return NULL.
