Index: trunk/psLib/test/math/tst_psFunc00.c
===================================================================
--- trunk/psLib/test/math/tst_psFunc00.c	(revision 4547)
+++ trunk/psLib/test/math/tst_psFunc00.c	(revision 4581)
@@ -4,19 +4,19 @@
 *    allocated and deallocated by the psPolynomialXXXlloc() procedures.
 *    It also calls the various psPolynomialXXXEval() procedures.
-* 
+*
 *    The F32 and F64 polynomials are tested for all orders (1 - 4) and for
 *    both ordinary and chebyshev polynomials.
-* 
+*
 *    NOTE: This test code requries the stdout file to verify that the results
 *    are good.
-* 
+*
 *    XXX: Modify these tests so that polynomials with a variety of different
 *    orders are created.
-* 
-*    @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 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
-*   
+*
 *****************************************************************************/
 #include <stdio.h>
@@ -31,8 +31,4 @@
 static psS32 testPolynomial3DAlloc(void);
 static psS32 testPolynomial4DAlloc(void);
-static psS32 testDPolynomial1DAlloc(void);
-static psS32 testDPolynomial2DAlloc(void);
-static psS32 testDPolynomial3DAlloc(void);
-static psS32 testDPolynomial4DAlloc(void);
 
 testDescription tests[] = {
@@ -41,8 +37,4 @@
                               {testPolynomial3DAlloc,578,"psPolynomial3DAlloc",0,false},
                               {testPolynomial4DAlloc,578,"psPolynomial4DAlloc",0,false},
-                              {testDPolynomial1DAlloc,579,"psDPolynomial1DAlloc",0,false},
-                              {testDPolynomial2DAlloc,579,"psDPolynomial2DAlloc",0,false},
-                              {testDPolynomial3DAlloc,579,"psDPolynomial3DAlloc",0,false},
-                              {testDPolynomial4DAlloc,579,"psDPolynomial4DAlloc",0,false},
                               {NULL}
                           };
@@ -109,56 +101,4 @@
 }
 
-// This test will allocate a 1D polynomial and verify the structure allocated
-psS32 testDPolynomial1DAlloc(void)
-{
-    psDPolynomial1D*  my1DDPoly  = NULL;
-
-    // Allocate polynomial
-    my1DDPoly = psDPolynomial1DAlloc(ORDER,PS_POLYNOMIAL_CHEB);
-    // Verify structure allocated
-    if(my1DDPoly == NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Returned NULL not expected");
-        return 1;
-    }
-    // Verify polynomial structure members set properly
-    if(my1DDPoly->n != ORDER) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my1DDPoly->n, ORDER);
-        return 2;
-    }
-    if(my1DDPoly->type != PS_POLYNOMIAL_CHEB) {
-        psError(PS_ERR_UNKNOWN,true,"Type %d not as expected %d",
-                my1DDPoly->type, PS_POLYNOMIAL_CHEB);
-        return 3;
-    }
-    for(psS32 i = 0; i < ORDER; i++) {
-        if(my1DDPoly->coeff[i] != 0.0) {
-            psError(PS_ERR_UNKNOWN,true,"Coeff[%d] %lg not as expected %lg",
-                    i, my1DDPoly->coeff[i], 0.0);
-            return 4;
-        }
-        if(my1DDPoly->coeffErr[i] != 0.0) {
-            psError(PS_ERR_UNKNOWN,true,"CoeffErr[%d] %lg not as expected %lg",
-                    i, my1DDPoly->coeffErr[i], 0.0);
-            return 5;
-        }
-        if(my1DDPoly->mask[i] != 0) {
-            psError(PS_ERR_UNKNOWN,true,"Mask[%d] %d not as expected %d",
-                    i, my1DDPoly->mask[i], 0);
-            return 6;
-        }
-    }
-    psFree(my1DDPoly);
-
-    /*    // Attempt to allocate with negative order
-        psLogMsg(__func__,PS_LOG_INFO,"Following should generate error msg for negative terms");
-        if(psDPolynomial1DAlloc(-1,PS_POLYNOMIAL_ORD) != NULL) {
-            psError(PS_ERR_UNKNOWN,true,"Returned structure but expected NULL");
-            return 7;
-        }
-    */
-    return 0;
-}
-
 // This test will allocate a 2D polynomial and verify the structure allocated
 psS32 testPolynomial2DAlloc(void)
@@ -220,70 +160,4 @@
         psLogMsg(__func__,PS_LOG_INFO,"Following should generate error msg for negative terms");
         if(psPolynomial2DAlloc(1,-1,PS_POLYNOMIAL_ORD) != NULL) {
-            psError(PS_ERR_UNKNOWN,true,"Returned structure but expected NULL");
-            return 9;
-        }
-    */
-    return 0;
-}
-
-// This test will allocate a 2D polynomial and verify the structure allocated
-psS32 testDPolynomial2DAlloc(void)
-{
-    psDPolynomial2D* my2DDPoly = NULL;
-
-    // Allocate polynomial
-    my2DDPoly = psDPolynomial2DAlloc(ORDER,ORDER+1,PS_POLYNOMIAL_CHEB);
-    // Verify structure allocated
-    if(my2DDPoly == NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Returned NULL not expected");
-        return 1;
-    }
-    // Verify polynomial structure members set properly
-    if(my2DDPoly->nX != ORDER) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my2DDPoly->nX, ORDER);
-        return 2;
-    }
-    // Verify polynomial structure members set properly
-    if(my2DDPoly->nY != ORDER+1) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my2DDPoly->nY, ORDER+1);
-        return 3;
-    }
-    if(my2DDPoly->type != PS_POLYNOMIAL_CHEB) {
-        psError(PS_ERR_UNKNOWN,true,"Type %d not as expected %d",
-                my2DDPoly->type, PS_POLYNOMIAL_ORD);
-        return 4;
-    }
-    for(psS32 i = 0; i < ORDER; i++) {
-        for(psS32 j = 0; j < ORDER+1; j++) {
-            if(my2DDPoly->coeff[i][j] != 0.0) {
-                psError(PS_ERR_UNKNOWN,true,"Coeff[%d][%d] %lg not as expected %lg",
-                        i, j, my2DDPoly->coeff[i][j], 0.0);
-                return 5;
-            }
-            if(my2DDPoly->coeffErr[i][j] != 0.0) {
-                psError(PS_ERR_UNKNOWN,true,"CoeffErr[%d][%d] %lg not as expected %lg",
-                        i, j, my2DDPoly->coeffErr[i][j], 0.0);
-                return 6;
-            }
-            if(my2DDPoly->mask[i][j] != 0) {
-                psError(PS_ERR_UNKNOWN,true,"Mask[%d][%d] %d not as expected %d",
-                        i, j, my2DDPoly->mask[i][j], 0);
-                return 7;
-            }
-        }
-    }
-    psFree(my2DDPoly);
-    /*
-        // Attempt to allocate with negative order
-        psLogMsg(__func__,PS_LOG_INFO,"Following should generate error msg for negative terms");
-        if(psDPolynomial2DAlloc(-1,1,PS_POLYNOMIAL_ORD) != NULL) {
-            psError(PS_ERR_UNKNOWN,true,"Returned structure but expected NULL");
-            return 8;
-        }
-        // Attempt to allocate with negative order
-        psLogMsg(__func__,PS_LOG_INFO,"Following should generate error msg for negative terms");
-        if(psDPolynomial2DAlloc(1,-1,PS_POLYNOMIAL_ORD) != NULL) {
             psError(PS_ERR_UNKNOWN,true,"Returned structure but expected NULL");
             return 9;
@@ -366,84 +240,4 @@
         psLogMsg(__func__,PS_LOG_INFO,"Following should generate error msg for negative terms");
         if(psPolynomial3DAlloc(1,1,-1,PS_POLYNOMIAL_ORD) != NULL) {
-            psError(PS_ERR_UNKNOWN,true,"Returned structure but expected NULL");
-            return 11;
-        }
-    */
-    return 0;
-}
-
-// This test will allocate a 3D polynomial and verify the structure allocated
-psS32 testDPolynomial3DAlloc(void)
-{
-    psDPolynomial3D* my3DDPoly = NULL;
-
-    // Allocate polynomial
-    my3DDPoly = psDPolynomial3DAlloc(ORDER,ORDER+1,ORDER+2,PS_POLYNOMIAL_CHEB);
-    // Verify structure allocated
-    if(my3DDPoly == NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Returned NULL not expected");
-        return 1;
-    }
-    // Verify polynomial structure members set properly
-    if(my3DDPoly->nX != ORDER) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my3DDPoly->nX, ORDER);
-        return 2;
-    }
-    // Verify polynomial structure members set properly
-    if(my3DDPoly->nY != ORDER+1) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my3DDPoly->nY, ORDER+1);
-        return 3;
-    }
-    // Verify polynomial structure members set properly
-    if(my3DDPoly->nZ != ORDER+2) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my3DDPoly->nZ, ORDER+2);
-        return 4;
-    }
-    if(my3DDPoly->type != PS_POLYNOMIAL_CHEB) {
-        psError(PS_ERR_UNKNOWN,true,"Type %d not as expected %d",
-                my3DDPoly->type, PS_POLYNOMIAL_ORD);
-        return 5;
-    }
-    for(psS32 i = 0; i < ORDER; i++) {
-        for(psS32 j = 0; j < ORDER+1; j++) {
-            for(psS32 k = 0; k < ORDER+2; k++) {
-                if(my3DDPoly->coeff[i][j][k] != 0.0) {
-                    psError(PS_ERR_UNKNOWN,true,"Coeff[%d][%d][%d] %lg not as expected %lg",
-                            i, j, k, my3DDPoly->coeff[i][j][k], 0.0);
-                    return 6;
-                }
-                if(my3DDPoly->coeffErr[i][j][k] != 0.0) {
-                    psError(PS_ERR_UNKNOWN,true,"CoeffErr[%d][%d][%d] %lg not as expected %lg",
-                            i, j, k, my3DDPoly->coeffErr[i][j][k], 0.0);
-                    return 7;
-                }
-                if(my3DDPoly->mask[i][j][k] != 0) {
-                    psError(PS_ERR_UNKNOWN,true,"Mask[%d][%d] %d not as expected %d",
-                            i, j, k, my3DDPoly->mask[i][j][k], 0);
-                    return 8;
-                }
-            }
-        }
-    }
-    psFree(my3DDPoly);
-
-    /*    // Attempt to allocate with negative order
-        psLogMsg(__func__,PS_LOG_INFO,"Following should generate error msg for negative terms");
-        if(psDPolynomial3DAlloc(-1,1,1,PS_POLYNOMIAL_ORD) != NULL) {
-            psError(PS_ERR_UNKNOWN,true,"Returned structure but expected NULL");
-            return 9;
-        }
-        // Attempt to allocate with negative order
-        psLogMsg(__func__,PS_LOG_INFO,"Following should generate error msg for negative terms");
-        if(psDPolynomial3DAlloc(1,-1,1,PS_POLYNOMIAL_ORD) != NULL) {
-            psError(PS_ERR_UNKNOWN,true,"Returned structure but expected NULL");
-            return 10;
-        }
-        // Attempt to allocate with negative order
-        psLogMsg(__func__,PS_LOG_INFO,"Following should generate error msg for negative terms");
-        if(psDPolynomial3DAlloc(1,1,-1,PS_POLYNOMIAL_ORD) != NULL) {
             psError(PS_ERR_UNKNOWN,true,"Returned structure but expected NULL");
             return 11;
@@ -547,96 +341,2 @@
 }
 
-// This test will allocate a 4D polynomial and verify the structure allocated
-psS32 testDPolynomial4DAlloc(void)
-{
-    psDPolynomial4D* my4DDPoly = NULL;
-
-    // Allocate polynomial
-    my4DDPoly = psDPolynomial4DAlloc(ORDER+3,ORDER,ORDER+1,ORDER+2,PS_POLYNOMIAL_ORD);
-    // Verify structure allocated
-    if(my4DDPoly == NULL) {
-        psError(PS_ERR_UNKNOWN,true,"Returned NULL not expected");
-        return 1;
-    }
-    // Verify polynomial structure members set properly
-    if(my4DDPoly->nY != ORDER) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my4DDPoly->nY, ORDER);
-        return 2;
-    }
-    // Verify polynomial structure members set properly
-    if(my4DDPoly->nZ != ORDER+1) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my4DDPoly->nZ, ORDER+1);
-        return 3;
-    }
-    // Verify polynomial structure members set properly
-    if(my4DDPoly->nT != ORDER+2) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my4DDPoly->nT, ORDER+2);
-        return 4;
-    }
-    // Verify polynomial structure members set properly
-    if(my4DDPoly->nX != ORDER+3) {
-        psError(PS_ERR_UNKNOWN,true,"Number of terms %d not as expected %d",
-                my4DDPoly->nX, ORDER+3);
-        return 5;
-    }
-    if(my4DDPoly->type != PS_POLYNOMIAL_ORD) {
-        psError(PS_ERR_UNKNOWN,true,"Type %d not as expected %d",
-                my4DDPoly->type, PS_POLYNOMIAL_ORD);
-        return 6;
-    }
-    for(psS32 i = 0; i < ORDER+3; i++) {
-        for(psS32 j = 0; j < ORDER; j++) {
-            for(psS32 k = 0; k < ORDER+1; k++) {
-                for(psS32 l = 0; l < ORDER+2; l++) {
-                    if(my4DDPoly->coeff[i][j][k][l] != 0.0) {
-                        psError(PS_ERR_UNKNOWN,true,"Coeff[%d][%d][%d][%d] %lg not as expected %lg",
-                                i, j, k, l, my4DDPoly->coeff[i][j][k][l], 0.0);
-                        return 7;
-                    }
-                    if(my4DDPoly->coeffErr[i][j][k][l] != 0.0) {
-                        psError(PS_ERR_UNKNOWN,true,"CoeffErr[%d][%d][%d][l] %lg not as expected %lg",
-                                i, j, k, l, my4DDPoly->coeffErr[i][j][k][l], 0.0);
-                        return 8;
-                    }
-                    if(my4DDPoly->mask[i][j][k][l] != 0) {
-                        psError(PS_ERR_UNKNOWN,true,"Mask[%d][%d][%d][%d] %d not as expected %d",
-                                i, j, k, l, my4DDPoly->mask[i][j][k][l], 0);
-                        return 9;
-                    }
-                }
-            }
-        }
-    }
-    psFree(my4DDPoly);
-
-    /*    // Attempt to allocate with negative order
-        psLogMsg(__func__,PS_LOG_INFO,"Following should generate error msg for negative terms");
-        if(psDPolynomial4DAlloc(-1,1,1,1,PS_POLYNOMIAL_ORD) != NULL) {
-            psError(PS_ERR_UNKNOWN,true,"Returned structure but expected NULL");
-            return 10;
-        }
-        // Attempt to allocate with negative order
-        psLogMsg(__func__,PS_LOG_INFO,"Following should generate error msg for negative terms");
-        if(psDPolynomial4DAlloc(1,-1,1,1,PS_POLYNOMIAL_ORD) != NULL) {
-            psError(PS_ERR_UNKNOWN,true,"Returned structure but expected NULL");
-            return 11;
-        }
-        // Attempt to allocate with negative order
-        psLogMsg(__func__,PS_LOG_INFO,"Following should generate error msg for negative terms");
-        if(psDPolynomial4DAlloc(1,1,-1,1,PS_POLYNOMIAL_ORD) != NULL) {
-            psError(PS_ERR_UNKNOWN,true,"Returned structure but expected NULL");
-            return 12;
-        }
-        // Attempt to allocate with negative order
-        psLogMsg(__func__,PS_LOG_INFO,"Following should generate error msg for negative terms");
-        if(psDPolynomial4DAlloc(1,1,1,-1,PS_POLYNOMIAL_ORD) != NULL) {
-            psError(PS_ERR_UNKNOWN,true,"Returned structure but expected NULL");
-            return 13;
-        }
-    */
-    return 0;
-}
-
