Index: trunk/psLib/test/astro/tst_psEarthOrientation.c
===================================================================
--- trunk/psLib/test/astro/tst_psEarthOrientation.c	(revision 5493)
+++ trunk/psLib/test/astro/tst_psEarthOrientation.c	(revision 5507)
@@ -5,6 +5,6 @@
 *  @author d-Rob, MHPCC
 *
-*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-11-10 00:13:51 $
+*  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-11-12 03:37:34 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -139,5 +139,55 @@
 psS32 testEOCPrecession(void)
 {
-
+    psTime *empty = NULL;
+    psTime *time = psTimeAlloc(PS_TIME_TAI);
+    time->sec = 1131579114;
+    time->nsec = 498489000;
+    time->leapsecond = false;
+
+
+    //Tests for Precession Correction function//
+    //Return NULL for NULL time input
+    psEarthPole *pcorr = NULL;
+    pcorr = psEOC_PrecessionCorr(empty, PS_IERS_A);
+    if (pcorr != NULL) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psEOC_PrecessionCorr failed to return NULL for NULL time input.\n");
+        return 4;
+    }
+
+    //Return NULL for Invalid IERS table
+    pcorr = psEOC_PrecessionCorr(time, 3);
+    if (pcorr != NULL) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psEOC_PrecessionCorr failed to return NULL for incorrect IERS table.\n");
+        return 5;
+    }
+    psFree(pcorr);
+
+    //Check values from IERS table A
+    pcorr = psEOC_PrecessionCorr(time, PS_IERS_A);
+    if ( pcorr == NULL ) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, false,
+                "psEOC_PrecessionCorr returned NULL for valid inputs.\n");
+        return 6;
+    } else {
+        printf("Precession Correction output (IERSA) = x,y,s = %.8g, %.8g, %.8g\n",
+               pcorr->x, pcorr->y, pcorr->s);
+    }
+    psFree(pcorr);
+
+    //Check values from IERS table B
+    pcorr = psEOC_PrecessionCorr(time, PS_IERS_B);
+    if ( pcorr == NULL ) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, false,
+                "psEOC_PrecessionCorr returned NULL for valid inputs.\n");
+        return 7;
+    } else {
+        printf("Precession Correction output (IERSB) = x,y,s = %.8g, %.8g, %.8g\n",
+               pcorr->x, pcorr->y, pcorr->s);
+    }
+    psFree(pcorr);
+
+    psFree(time);
     return 0;
 }
@@ -167,7 +217,27 @@
     }
 
+    psEarthPole *polarMotion = NULL;
+    polarMotion = psEOC_GetPolarMotion(empty, PS_IERS_B);
+    if (polarMotion != NULL) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                "psEOC_GetPolarMotion failed to return NULL for NULL input time.\n");
+        return 3;
+    }
+    polarMotion = psEOC_GetPolarMotion(in, PS_IERS_B);
+    if (polarMotion == NULL) {
+        psError(PS_ERR_BAD_PARAMETER_NULL, false,
+                "psEOC_GetPolarMotion returned NULL for valid input time.\n");
+        return 4;
+    }
+
+    psSphere *interm = p_psTimeGetPoleCoords(in);
+    printf(" -- sphere = r=%.8g, d=%.8g\n", interm->r, interm->d);
     printf(" -- Eop = x=%.8g, y=%.8g, s=%.8g\n", eop->x, eop->y, eop->s);
+    printf(" -- PolarMotion = x=%.8g, y=%.8g, s=%.8g\n", polarMotion->x,
+           polarMotion->y, polarMotion->s);
     psFree(in);
     psFree(eop);
+    psFree(polarMotion);
+    psFree(interm);
     return 0;
 }
