Index: /trunk/psLib/test/astronomy/tst_psCoord.c
===================================================================
--- /trunk/psLib/test/astronomy/tst_psCoord.c	(revision 3332)
+++ /trunk/psLib/test/astronomy/tst_psCoord.c	(revision 3333)
@@ -6,6 +6,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-02-25 20:50:35 $
+*  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-02-25 22:27:37 $
 *
 *  XXX: Must test psSpherePrecess.
@@ -31,6 +31,6 @@
 static psS32 testSphereTransformICRSToEcliptic( void );
 static psS32 testSphereTransformEclipticToICRS( void );
-static psS32 test7( void );
-static psS32 test8( void );
+static psS32 testSphereTransformICRSToGalactic( void );
+static psS32 testSphereTransformGalacticToICRS( void );
 //static psS32 test20( void );
 //static psS32 test21( void );
@@ -49,6 +49,6 @@
                               {testSphereTransformICRSToEcliptic, 821, "psSphereTransformICRSToEcliptic()", 0, false},
                               {testSphereTransformEclipticToICRS, 822, "psSphereTransformEclipticToICRS()", 0, false},
-                              {test7, 0000, "psSphereTransformICRSToGalatic()", 0, false},
-                              {test8, 0000, "psSphereTransformGalaticToICRS()", 0, false},
+                              {testSphereTransformICRSToGalactic, 824, "psSphereTransformICRSToGalactic()", 0, false},
+                              {testSphereTransformGalacticToICRS, 823, "psSphereTransformGalacticToICRS()", 0, false},
                               //         {test20, 0000, "psProject()", 0, false},
                               //         {test21, 0000, "psDeProject()", 0, false},
@@ -778,68 +778,86 @@
 }
 
-psS32 test7( void )
-{
-    psS32 testStatus = 0;
-    // XXX: This test code is simply a copy of the original source code.
-    psF64 expectedAlphaP = DEG_TO_RAD(32.93192);
-    psF64 expectedDeltaP = DEG_TO_RAD(-62.87175);
-    psF64 expectedPhiP = DEG_TO_RAD(282.85948);
-    psSphereTransform *myST = psSphereTransformICRSToGalatic();
-
-    if (FLT_EPSILON < fabs(sin(expectedDeltaP) - myST->sinDeltaP)) {
-        printf("ERROR: myST->sinDeltaP is %f, should be %f\n", myST->sinDeltaP, sin(expectedDeltaP));
-        testStatus = 1;
-    }
-
-    if (FLT_EPSILON < fabs(cos(expectedDeltaP) - myST->cosDeltaP)) {
-        printf("ERROR: myST->cosDeltaP is %f, should be %f\n", myST->cosDeltaP, cos(expectedDeltaP));
-        testStatus = 1;
-    }
-
-    if (FLT_EPSILON < fabs(expectedAlphaP - myST->alphaP)) {
-        printf("ERROR: myST->alphaP is %f, should be %f\n", myST->alphaP, expectedAlphaP);
-        testStatus = 3;
-    }
-
-    if (FLT_EPSILON < fabs(expectedPhiP - myST->phiP)) {
-        printf("ERROR: myST->phiP is %f, should be %f\n", myST->phiP, expectedPhiP);
-        testStatus = 4;
-    }
-
+#define ITG_EXPECT_PHIP        4.93683
+#define ITG_EXPECT_SINDELTAP  -0.88999
+#define ITG_EXPECT_COSDELTAP   0.45598
+#define ITG_EXPECT_ALPHAP      0.57477
+
+psS32 testSphereTransformICRSToGalactic( void )
+{
+    // Invoke function
+    psSphereTransform *myST = psSphereTransformICRSToGalactic();
+
+    // Verify did not return NULL
+    if(myST == NULL) {
+        psError(PS_ERR_UNKNOWN,true,"psSphereTransformICRSToGalactic returned NULL");
+        return 1;
+    }
+    // Verify returned structure has members set properly
+    if (ERROR_TOL < fabs(ITG_EXPECT_SINDELTAP - myST->sinDeltaP)) {
+        psError(PS_ERR_UNKNOWN,true,"myST->sinDeltaP is %f, should be %f",
+                myST->sinDeltaP, ITG_EXPECT_SINDELTAP);
+        return 2;
+    }
+    if (ERROR_TOL < fabs(ITG_EXPECT_COSDELTAP - myST->cosDeltaP)) {
+        psError(PS_ERR_UNKNOWN,true,"myST->cosDeltaP is %f, should be %f",
+                myST->cosDeltaP, ITG_EXPECT_COSDELTAP);
+        return 3;
+    }
+    if (ERROR_TOL < fabs(ITG_EXPECT_ALPHAP - myST->alphaP)) {
+        psError(PS_ERR_UNKNOWN,true,"myST->alphaP is %f, should be %f",
+                myST->alphaP, ITG_EXPECT_ALPHAP);
+        return 4;
+    }
+    if (ERROR_TOL < fabs(ITG_EXPECT_PHIP - myST->phiP)) {
+        psError(PS_ERR_UNKNOWN,true,"myST->phiP is %f, should be %f",
+                myST->phiP, ITG_EXPECT_PHIP);
+        return 5;
+    }
+    // Free data structure created
     psFree(myST);
-    return(testStatus);
-}
-
-psS32 test8( void )
-{
-    psS32 testStatus = 0;
-    // XXX: This test code is simply a copy of the original source code.
-    psF64 expectedAlphaP = DEG_TO_RAD(282.85948);
-    psF64 expectedDeltaP = DEG_TO_RAD(62.87175);
-    psF64 expectedPhiP = DEG_TO_RAD(32.93192);
-    psSphereTransform *myST = psSphereTransformGalaticToICRS();
-
-    if (FLT_EPSILON < fabs(sin(expectedDeltaP) - myST->sinDeltaP)) {
-        printf("ERROR: myST->sinDeltaP is %f, should be %f\n", myST->sinDeltaP, sin(expectedDeltaP));
-        testStatus = 1;
-    }
-
-    if (FLT_EPSILON < fabs(cos(expectedDeltaP) - myST->cosDeltaP)) {
-        printf("ERROR: myST->cosDeltaP is %f, should be %f\n", myST->cosDeltaP, cos(expectedDeltaP));
-        testStatus = 1;
-    }
-
-    if (FLT_EPSILON < fabs(expectedAlphaP - myST->alphaP)) {
-        printf("ERROR: myST->alphaP is %f, should be %f\n", myST->alphaP, expectedAlphaP);
-        testStatus = 3;
-    }
-
-    if (FLT_EPSILON < fabs(expectedPhiP - myST->phiP)) {
-        printf("ERROR: myST->phiP is %f, should be %f\n", myST->phiP, expectedPhiP);
-        testStatus = 4;
-    }
-
+
+    return 0;
+}
+
+#define GTI_EXPECT_ALPHAP      4.93683
+#define GTI_EXPECT_SINDELTAP   0.88999
+#define GTI_EXPECT_COSDELTAP   0.45598
+#define GTI_EXPECT_PHIP        0.57477
+
+psS32 testSphereTransformGalacticToICRS( void )
+{
+    // Invoke function
+    psSphereTransform *myST = psSphereTransformGalacticToICRS();
+
+    // Verify did not return NULL
+    if(myST == NULL) {
+        psError(PS_ERR_UNKNOWN,true,"psSphereTransformGalacticToICRS returned NULL");
+        return 1;
+    }
+    // Verify returned structure has members set properly
+    if (ERROR_TOL < fabs(GTI_EXPECT_SINDELTAP - myST->sinDeltaP)) {
+        psError(PS_ERR_UNKNOWN,true,"myST->sinDeltaP is %f, should be %f",
+                myST->sinDeltaP, GTI_EXPECT_SINDELTAP);
+        return 2;
+    }
+    if (ERROR_TOL < fabs(GTI_EXPECT_COSDELTAP - myST->cosDeltaP)) {
+        psError(PS_ERR_UNKNOWN,true,"myST->cosDeltaP is %f, should be %f",
+                myST->cosDeltaP, GTI_EXPECT_COSDELTAP);
+        return 3;
+    }
+    if (ERROR_TOL < fabs(GTI_EXPECT_ALPHAP - myST->alphaP)) {
+        psError(PS_ERR_UNKNOWN,true,"myST->alphaP is %f, should be %f",
+                myST->alphaP, GTI_EXPECT_ALPHAP);
+        return 4;
+    }
+    if (ERROR_TOL < fabs(GTI_EXPECT_PHIP - myST->phiP)) {
+        psError(PS_ERR_UNKNOWN,true,"myST->phiP is %f, should be %f",
+                myST->phiP, GTI_EXPECT_PHIP);
+        return 5;
+    }
+    // Free data structure created
     psFree(myST);
-    return(testStatus);
+
+    return 0;
 }
 
Index: /trunk/psLib/test/astronomy/verified/tst_psCoord.stderr
===================================================================
--- /trunk/psLib/test/astronomy/verified/tst_psCoord.stderr	(revision 3332)
+++ /trunk/psLib/test/astronomy/verified/tst_psCoord.stderr	(revision 3333)
@@ -134,19 +134,19 @@
 /***************************** TESTPOINT ******************************************\
 *             TestFile: tst_psCoord.c                                              *
-*            TestPoint: psCoord{psSphereTransformICRSToGalatic()}                  *
+*            TestPoint: psCoord{psSphereTransformICRSToGalactic()}                 *
 *             TestType: Positive                                                   *
 \**********************************************************************************/
 
 
----> TESTPOINT PASSED (psCoord{psSphereTransformICRSToGalatic()} | tst_psCoord.c)
+---> TESTPOINT PASSED (psCoord{psSphereTransformICRSToGalactic()} | tst_psCoord.c)
 
 /***************************** TESTPOINT ******************************************\
 *             TestFile: tst_psCoord.c                                              *
-*            TestPoint: psCoord{psSphereTransformGalaticToICRS()}                  *
+*            TestPoint: psCoord{psSphereTransformGalacticToICRS()}                 *
 *             TestType: Positive                                                   *
 \**********************************************************************************/
 
 
----> TESTPOINT PASSED (psCoord{psSphereTransformGalaticToICRS()} | tst_psCoord.c)
+---> TESTPOINT PASSED (psCoord{psSphereTransformGalacticToICRS()} | tst_psCoord.c)
 
 /***************************** TESTPOINT ******************************************\
