Index: trunk/psLib/test/astro/tst_psEarthOrientation.c
===================================================================
--- trunk/psLib/test/astro/tst_psEarthOrientation.c	(revision 5483)
+++ trunk/psLib/test/astro/tst_psEarthOrientation.c	(revision 5493)
@@ -5,6 +5,6 @@
 *  @author d-Rob, MHPCC
 *
-*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-11-07 20:52:43 $
+*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-11-10 00:13:51 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -69,5 +69,6 @@
     //    direction->r = 0.2035;
     //    direction->d = 0.2035;
-    direction->r = DEG_TO_RAD(48.0);
+    //    direction->r = DEG_TO_RAD(48.0);
+    direction->r = DEG_TO_RAD(-157.0);
     direction->d = DEG_TO_RAD(20.7072);
 
@@ -108,6 +109,6 @@
     sun->r = 0.2;
     sun->d = 0.2;
-    actual->r = 0.2035;
-    actual->d = 0.2035;
+    actual->r = 0.61001;
+    actual->d = 0.01999;
 
     empty = psGravityDeflection(apparent, empty, sun);
@@ -126,5 +127,5 @@
     apparent = psGravityDeflection(apparent, actual, sun);
     psSphere *result = psSphereSetOffset(actual, apparent, PS_SPHERICAL, PS_RADIAN);
-    printf("\nActual r,d = %.13g,%.13g    Apparent r,d = %.13g, %.13g \n",
+    printf("\nActual r,d = %.13g,%.13g    Apparent r,d = %.16g, %.16g \n",
            actual->r, actual->d, result->r, result->d);
     psFree(result);
@@ -144,5 +145,29 @@
 psS32 testEOCPolar(void)
 {
-
+    //    psTime *in = psTimeGetNow(PS_TIME_TAI);
+    psTime *in = psTimeAlloc(PS_TIME_TAI);
+    in->sec = 1131579114;
+    in->nsec = 498489000;
+    in->leapsecond = false;
+    psTime *empty = NULL;
+    psEarthPole *eop = NULL;
+
+    eop = psEOC_PolarTideCorr(empty);
+    if (eop != NULL) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psEOC_PolarTideCorr failed to return NULL for NULL input time.\n");
+        return 1;
+    }
+
+    eop = psEOC_PolarTideCorr(in);
+    if (eop == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, false,
+                "psEOC_PolarTideCorr returned NULL for valid input time.\n");
+        return 2;
+    }
+
+    printf(" -- Eop = x=%.8g, y=%.8g, s=%.8g\n", eop->x, eop->y, eop->s);
+    psFree(in);
+    psFree(eop);
     return 0;
 }
@@ -170,4 +195,35 @@
 psS32 testSphereRot_CEOtoGCRS(void)
 {
+    psEarthPole *in = psEarthPoleAlloc();
+    psEarthPole *empty = NULL;
+    psSphereRot *rot = NULL;
+
+    in->x = M_PI / 4.0;
+    in->y = M_PI / 6.0;
+    in->s = M_PI / 8.0;
+
+    rot = psSphereRot_CEOtoGCRS(empty);
+    if (rot != NULL) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psSphereRot_CEOtoGCRS failed to return NULL for NULL input psEarthPole.\n");
+        return 1;
+    }
+
+    rot = psSphereRot_CEOtoGCRS(in);
+    if (rot == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, false,
+                "psSphereRot_CEOtoGCRS return NULL for valid psEarthPole input.\n");
+        return 2;
+    }
+
+    psSphere *test = psSphereAlloc();
+    test->r = 0.0;
+    test->d = 0.0;
+    test = psSphereRotApply(test, rot, test);
+    printf("\n  Sphere -test- has values r,d = %.8g, %.8g \n", test->r, test->d);
+
+    psFree(test);
+    psFree(rot);
+    psFree(in);
     return 0;
 }
@@ -175,5 +231,36 @@
 psS32 testSphereRot_ITRStoTEO(void)
 {
-    return 0;
-}
-
+    psEarthPole *in = psEarthPoleAlloc();
+    psEarthPole *empty = NULL;
+    psSphereRot *rot = NULL;
+
+    in->x = M_PI / 4.0;
+    in->y = M_PI / 6.0;
+    in->s = M_PI / 8.0;
+
+    rot = psSphereRot_ITRStoTEO(empty);
+    if (rot != NULL) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psSphereRot_ITRStoTEO failed to return NULL for NULL input psEarthPole.\n");
+        return 1;
+    }
+
+    rot = psSphereRot_ITRStoTEO(in);
+    if (rot == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, false,
+                "psSphereRot_ITRStoTEO return NULL for valid psEarthPole input.\n");
+        return 2;
+    }
+
+    psSphere *test = psSphereAlloc();
+    test->r = 0.0;
+    test->d = 0.0;
+    test = psSphereRotApply(test, rot, test);
+    printf("\n  Sphere -test- has values r,d = %.8g, %.8g \n", test->r, test->d);
+
+    psFree(test);
+    psFree(rot);
+    psFree(in);
+    return 0;
+}
+
