Index: trunk/psLib/test/astro/tst_psSphereOps.c
===================================================================
--- trunk/psLib/test/astro/tst_psSphereOps.c	(revision 5368)
+++ trunk/psLib/test/astro/tst_psSphereOps.c	(revision 5437)
@@ -6,6 +6,6 @@
 *  @author d-Rob, MHPCC
 *
-*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-10-18 22:14:47 $
+*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-10-21 02:14:02 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -19,4 +19,6 @@
 static psS32 testSphereRotApplyCelestial(void);
 static psS32 testSphereRotPrecess(void);
+static psS32 testSphereToFromCube(void);
+static psS32 testSphereOffset(void);
 
 testDescription tests[] = {
@@ -26,4 +28,6 @@
                               {testSphereRotApplyCelestial, 822, "psSphereRotApplyCel()", 0, false},
                               {testSphereRotPrecess, 823, "psSphereRotPrecess()", 0, false},
+                              {testSphereToFromCube, 824, "testSphereToFromCube()", 0, false},
+                              {testSphereOffset, 825, "testSphereOffset()", 0, false},
                               {NULL}
                           };
@@ -147,6 +151,8 @@
     psSphere *temp = NULL;
     psSphere *rc = NULL;
+    psSphere *temp2 = psSphereAlloc();
     //        psSphereRot *myST = psSphereRotAlloc(0.0, 0.0, 0.0);
     psSphereRot *myST = psSphereRotAlloc(ALPHA_P, DELTA_P, PHI_P);
+    psSphereRot *yourST =  psSphereRotInvert(ALPHA_P, DELTA_P, PHI_P);
 
     for (float r=0.0;r<180.0;r+=DEG_INC) {
@@ -157,10 +163,6 @@
             in->dErr = 0.0;
 
-            if(psSphereRotApply(out, myST, in) != out) {
-                psError(PS_ERR_UNKNOWN,true,"Did not return output pointer.");
-                return 1;
-            }
-            psSphereRotInvert(myST);
-            psSphereRotApply(out, myST, out);
+            temp2 = psSphereRotApply(temp2, myST, in);
+            out = psSphereRotApply(out, yourST, temp2);
 
             if (ERROR_TOL < fabs(out->r - in->r)) {
@@ -199,4 +201,6 @@
 
     psFree(myST);
+    psFree(yourST);
+    psFree(temp2);
     psFree(out);
     psFree(in);
@@ -209,5 +213,4 @@
 psS32 testSphereRotApplyCelestial( void)
 {
-
     int numTestPoints = 3;
     // ICRS coordinates
@@ -220,10 +223,6 @@
     double l[] =     { 96.337272, 122.93192, 195.639488};
     double b[] =     {-60.188553,  27.12825,  78.353806};
-
     double t[] =     {  MJD_2000,  MJD_2000,   MJD_2100};
-
     double TOLERANCE = 0.001;
-
-
 
     for (int x = 0; x < numTestPoints; x++) {
@@ -286,5 +285,4 @@
             //               return 4;
         }
-
         psFree(galactic);
         psFree(icrsFromGalactic);
@@ -294,7 +292,5 @@
         psFree(toGalactic);
         psFree(fromGalactic);
-
-    }
-
+    }
     return 0;
 }
@@ -432,2 +428,13 @@
     return 0;
 }
+
+psS32 testSphereToFromCube(void)
+{
+    return 0;
+}
+
+psS32 testSphereOffset(void)
+{
+    return 0;
+}
+
