Index: trunk/psLib/test/math/tst_psFunc08.c
===================================================================
--- trunk/psLib/test/math/tst_psFunc08.c	(revision 4547)
+++ trunk/psLib/test/math/tst_psFunc08.c	(revision 4581)
@@ -4,6 +4,6 @@
 *  ORD and CHEB type polynomials.
 *
-*  @version  $Revision: 1.1 $  $Name: not supported by cvs2svn $
-*  @date  $Date: 2005-07-13 02:47:00 $
+*  @version  $Revision: 1.2 $  $Name: not supported by cvs2svn $
+*  @date  $Date: 2005-07-20 01:21:13 $
 *
 *  XXX: Probably should test single- and multi-dimensional polynomials in
@@ -22,13 +22,9 @@
 
 static psS32 testPoly1DEval(void);
-static psS32 testDPoly1DEval(void);
 static psS32 testPoly1DEvalVector(void);
-static psS32 testDPoly1DEvalVector(void);
 
 testDescription tests[] = {
                               {testPoly1DEval,000,"psPolynomial1DEval",0,false},
-                              {testDPoly1DEval,000,"psDPolynomial1DEval",0,false},
                               {testPoly1DEvalVector,000,"psPolynomial1DEvalVector",0,false},
-                              {testDPoly1DEvalVector,000,"psDPolynomial1DEvalVector",0,false},
                               {NULL}
                           };
@@ -58,6 +54,6 @@
 psS32 testPoly1DEval(void)
 {
-    psF32  result;
-    psF32  resultCheb;
+    psF64  result;
+    psF64  resultCheb;
 
     // Allocate polynomial structure
@@ -103,51 +99,4 @@
 }
 
-// This test will verify operation of 1D polynomial evaluation
-psS32 testDPoly1DEval(void)
-{
-    psF64  result;
-    psF64  resultCheb;
-
-    // Allocate polynomial structure
-    psDPolynomial1D*  polyOrd = psDPolynomial1DAlloc(TERMS, PS_POLYNOMIAL_ORD);
-    psDPolynomial1D*  polyCheb = psDPolynomial1DAlloc(TERMS, PS_POLYNOMIAL_CHEB);
-    // Set polynomial members
-    for(psS32 i = 0; i < TERMS; i++) {
-        polyOrd->coeff[i] = Dpoly1DCoeff[i];
-        polyOrd->mask[i]  = poly1DMask[i];
-        polyCheb->coeff[i] = 1.0;
-        polyCheb->mask[i]  = poly1DMask[i];
-    }
-    // Evaluate test points and verify results
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        result = psDPolynomial1DEval(polyOrd,Dpoly1DXValue[i]);
-        if(fabs(Dpoly1DXResult[i]-result) > ERROR_TOL ) {
-            psError(PS_ERR_UNKNOWN,true,"Evaluated value %lg not as expected %lg",
-                    result, Dpoly1DXResult[i]);
-            return i;
-        }
-        resultCheb = psDPolynomial1DEval(polyCheb,Dpoly1DXChebValue[i]);
-        if(fabs(Dpoly1DXChebResult[i]-resultCheb) > ERROR_TOL ) {
-            psError(PS_ERR_UNKNOWN,true,"Evaluated Chebyshev value %lg not as expected %lg",
-                    resultCheb, Dpoly1DXChebResult[i]);
-            return 5*i;
-        }
-    }
-    psFree(polyOrd);
-    psFree(polyCheb);
-
-    // Allocate polynomial with invalid type
-    polyOrd = psDPolynomial1DAlloc(TERMS, 99);
-    // Attempt to evaluation invalid polynomial type
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message invalid type");
-    result = psDPolynomial1DEval(polyOrd,0.0);
-    if ( !isnan(result) ) {
-        psError(PS_ERR_UNKNOWN,true,"Did not return NAN for invalid polynomial type");
-        return 20;
-    }
-    psFree(polyOrd);
-
-    return 0;
-}
 
 psS32 testPoly1DEvalVector(void)
@@ -156,95 +105,4 @@
     psPolynomial1D* polyOrd = psPolynomial1DAlloc(TERMS,PS_POLYNOMIAL_ORD);
     psPolynomial1D* polyCheb = psPolynomial1DAlloc(TERMS,PS_POLYNOMIAL_CHEB);
-
-    // Set polynomial members
-    for(psS32 i = 0; i < TERMS; i++) {
-        polyOrd->coeff[i] = poly1DCoeff[i];
-        polyOrd->mask[i]  = poly1DMask[i];
-        polyCheb->coeff[i] = 1.0;
-        polyCheb->mask[i]  = poly1DMask[i];
-    }
-
-    // Create input vectors
-    psVector* inputOrd = psVectorAlloc(TESTPOINTS, PS_TYPE_F32);
-    psVector* inputCheb = psVectorAlloc(TESTPOINTS, PS_TYPE_F32);
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        inputOrd->data.F32[i] = poly1DXValue[i];
-        inputCheb->data.F32[i] = poly1DXChebValue[i];
-    }
-
-    // Evaluate the vectors
-    psVector* outputOrd = psPolynomial1DEvalVector(polyOrd, inputOrd);
-    if(outputOrd == NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Unexpected return of NULL.");
-        return 1;
-    }
-    if(outputOrd->type.type != PS_TYPE_F32) {
-        psError(PS_ERR_UNKNOWN,true,"Output vector of type %d expected %d",
-                outputOrd->type.type, PS_TYPE_F32);
-        return 2;
-    }
-    psVector* outputCheb = psPolynomial1DEvalVector(polyCheb, inputCheb);
-    if(outputCheb == NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Unexpected return of NULL.");
-        return 1;
-    }
-    if(outputCheb->type.type != PS_TYPE_F32) {
-        psError(PS_ERR_UNKNOWN,true,"Output vector of type %d expected %d",
-                outputCheb->type.type, PS_TYPE_F32);
-        return 2;
-    }
-
-    // Verify the results
-    for(psS32 i = 0; i < TESTPOINTS; i++) {
-        if(fabs(poly1DXResult[i]-outputOrd->data.F32[i]) > ERROR_TOL) {
-            psError(PS_ERR_UNKNOWN,true,"Result[%d] %g not equal to expected %g",
-                    i, outputOrd->data.F32[i], poly1DXResult[i]);
-            return i*5;
-        }
-        if(fabs(poly1DXChebResult[i]-outputCheb->data.F32[i]) > ERROR_TOL) {
-            psError(PS_ERR_UNKNOWN,true,"ResultCheb[%d] %g not equal to expected %g",
-                    i, outputCheb->data.F32[i], poly1DXChebResult[i]);
-            return i*10;
-        }
-    }
-
-    // Attempt to invoke function with null polynomial
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL polynomial");
-    if(psPolynomial1DEvalVector(NULL, inputOrd) != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Return of NULL expected for NULL polynomial");
-        return 60;
-    }
-
-    // Attempt to invoke function with null input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL input vector");
-    if(psPolynomial1DEvalVector(polyOrd,NULL) != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Return of NULL expected for NULL input vector");
-        return 61;
-    }
-
-    // Attempt to invoke function with a non F32 type input vector
-    psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for invalid input type");
-    inputOrd->type.type = PS_TYPE_U8;
-    if(psPolynomial1DEvalVector(polyOrd,inputOrd) != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Return NULL expected for non-F32 input vector");
-        return 62;
-    }
-    inputOrd->type.type = PS_TYPE_F32;
-
-    psFree(inputOrd);
-    psFree(inputCheb);
-    psFree(outputOrd);
-    psFree(outputCheb);
-    psFree(polyOrd);
-    psFree(polyCheb);
-
-    return 0;
-}
-
-psS32 testDPoly1DEvalVector(void)
-{
-    // Allocate polynomial
-    psDPolynomial1D* polyOrd = psDPolynomial1DAlloc(TERMS,PS_POLYNOMIAL_ORD);
-    psDPolynomial1D* polyCheb = psDPolynomial1DAlloc(TERMS,PS_POLYNOMIAL_CHEB);
 
     // Set polynomial members
@@ -265,5 +123,5 @@
 
     // Evaluate the vectors
-    psVector* outputOrd = psDPolynomial1DEvalVector(polyOrd, inputOrd);
+    psVector* outputOrd = psPolynomial1DEvalVector(polyOrd, inputOrd);
     if(outputOrd == NULL) {
         psError(PS_ERR_UNKNOWN,true,"Unexpected return of NULL.");
@@ -275,5 +133,5 @@
         return 2;
     }
-    psVector* outputCheb = psDPolynomial1DEvalVector(polyCheb, inputCheb);
+    psVector* outputCheb = psPolynomial1DEvalVector(polyCheb, inputCheb);
     if(outputCheb == NULL) {
         psError(PS_ERR_UNKNOWN,true,"Unexpected return of NULL.");
@@ -302,5 +160,5 @@
     // Attempt to invoke function with null polynomial
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL polynomial");
-    if(psDPolynomial1DEvalVector(NULL, inputOrd) != NULL) {
+    if(psPolynomial1DEvalVector(NULL, inputOrd) != NULL) {
         psError(PS_ERR_UNKNOWN,true,"Return of NULL expected for NULL polynomial");
         return 60;
@@ -309,5 +167,5 @@
     // Attempt to invoke function with null input vector
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL input vector");
-    if(psDPolynomial1DEvalVector(polyOrd,NULL) != NULL) {
+    if(psPolynomial1DEvalVector(polyOrd,NULL) != NULL) {
         psError(PS_ERR_UNKNOWN,true,"Return of NULL expected for NULL input vector");
         return 61;
@@ -317,5 +175,5 @@
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for invalid input type");
     inputOrd->type.type = PS_TYPE_U8;
-    if(psDPolynomial1DEvalVector(polyOrd,inputOrd) != NULL) {
+    if(psPolynomial1DEvalVector(polyOrd,inputOrd) != NULL) {
         psError(PS_ERR_UNKNOWN,true,"Return NULL expected for non-F64 input vector");
         return 62;
