/*****************************************************************************
    This routine must ensure that the psPolynomial structures are
    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.
 *****************************************************************************/
#include <stdio.h>
#include "pslib.h"
#include "psTest.h"
#include "psMemory.h"
#include "psFunctions.h"
#define MISC_FLOAT_NUMBER 345.0
#define MISC_X_VALUE 5.0
#define MISC_X_CHEB_VALUE 0.5
#define MISC_INT_NUMBER 35
#define AN 2
#define BN 4
#define CN 6
#define DN 8

// XXX: This test comes from Paul Price.  We should add into the code.
#define ORDER 3
#define BAD 1
int t01()
{
    psPolynomial1D *poly = psPolynomial1DAlloc(ORDER, PS_POLYNOMIAL_ORD);

    for (int i = 0; i < poly->n; i++) {
        poly->coeff[i] = (float)i;
        if (i == BAD) {
            poly->mask[i] = 1;  // Don't use this coefficient!
        } else {
            poly->mask[i] = 0;
        }
    }

    fprintf(stderr,"Value using mask: %f\n", psPolynomial1DEval(poly, 0.5));

    // A different method of doing the same thing
    poly->coeff[BAD] = 0.0;
    poly->mask[BAD] = 0;

    fprintf(stderr,"Value using coefficient zeroing: %f\n", psPolynomial1DEval(poly, 0.5));

    psFree(poly);

    return(0);
}


psS32 main()
{
    t01();

    psPolynomial1D *my1DPoly = NULL;
    psPolynomial2D *my2DPoly = NULL;
    psPolynomial3D *my3DPoly = NULL;
    psPolynomial4D *my4DPoly = NULL;
    psDPolynomial1D *my1DPolyD = NULL;
    psDPolynomial2D *my2DPolyD = NULL;
    psDPolynomial3D *my3DPolyD = NULL;
    psDPolynomial4D *my4DPolyD = NULL;
    psS32 testStatus      = true;
    psS32 memLeaks        = 0;
    psS32 a               = 0;
    psS32 b               = 0;
    psS32 c               = 0;
    psS32 d               = 0;
    psS32 currentId       = 0;

    currentId       = psMemGetId();
    /*************************************************************************/
    /*  Allocate and initialize data structures                      */
    /*************************************************************************/
    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psPolynomial1D structure.");

    my1DPoly = psPolynomial1DAlloc(AN, PS_POLYNOMIAL_ORD);
    for (a = 0; a < AN ; a++) {
        my1DPoly->coeff[a] = MISC_FLOAT_NUMBER;
        my1DPoly->coeffErr[a] = MISC_FLOAT_NUMBER;
        my1DPoly->mask[a] = MISC_INT_NUMBER;
    }
    psMemCheckCorruption(1);

    printf("At (x) = (%f): %f\n", MISC_X_VALUE,
           psPolynomial1DEval(
               my1DPoly,
               MISC_X_VALUE
           ));

    psFree(my1DPoly);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psPolynomial1D structure.",
                testStatus);





    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psPolynomial2D structure.");
    my2DPoly = psPolynomial2DAlloc(AN, BN, PS_POLYNOMIAL_ORD);
    for (a = 0; a < AN ; a++) {
        for (b = 0; b < BN ; b++) {
            my2DPoly->coeff[a][b] = MISC_FLOAT_NUMBER;
            my2DPoly->coeffErr[a][b] = MISC_FLOAT_NUMBER;
            my2DPoly->mask[a][b] = MISC_INT_NUMBER;
        }
    }
    psMemCheckCorruption(1);

    printf("At (x, y) = (%f, %f): %f\n", MISC_X_VALUE, MISC_X_VALUE,
           psPolynomial2DEval(
               my2DPoly,
               MISC_X_VALUE,
               MISC_X_VALUE
           ));

    psFree(my2DPoly);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psPolynomial2D structure.",
                testStatus);



    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psPolynomial3D structure.");
    my3DPoly = psPolynomial3DAlloc(AN, BN, CN, PS_POLYNOMIAL_ORD);
    for (a = 0; a < AN ; a++) {
        for (b = 0; b < BN ; b++) {
            for (c = 0; c < CN ; c++) {
                my3DPoly->coeff[a][b][c] = MISC_FLOAT_NUMBER;
                my3DPoly->coeffErr[a][b][c] = MISC_FLOAT_NUMBER;
                my3DPoly->mask[a][b][c] = MISC_INT_NUMBER;
            }
        }
    }
    psMemCheckCorruption(1);

    printf("At (x, y, z) = (%f, %f, %f): %f\n", MISC_X_VALUE, MISC_X_VALUE,
           MISC_X_VALUE,
           psPolynomial3DEval(
               my3DPoly,
               MISC_X_VALUE,
               MISC_X_VALUE,
               MISC_X_VALUE
           ));

    psFree(my3DPoly);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psPolynomial3D structure.",
                testStatus);




    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psPolynomial4D structure.");
    my4DPoly = psPolynomial4DAlloc(AN, BN, CN, DN, PS_POLYNOMIAL_ORD);
    for (a = 0; a < AN ; a++) {
        for (b = 0; b < BN ; b++) {
            for (c = 0; c < CN ; c++) {
                for (d = 0; d < DN ; d++) {
                    my4DPoly->coeff[a][b][c][d] = MISC_FLOAT_NUMBER;
                    my4DPoly->coeffErr[a][b][c][d] = MISC_FLOAT_NUMBER;
                    my4DPoly->mask[a][b][c][d] = MISC_INT_NUMBER;
                }
            }
        }
    }
    psMemCheckCorruption(1);

    printf("At (w, x, y, z) = (%f, %f, %f, %f): %f\n", MISC_X_VALUE, MISC_X_VALUE,
           MISC_X_VALUE, MISC_X_VALUE,
           psPolynomial4DEval(
               my4DPoly,
               MISC_X_VALUE,
               MISC_X_VALUE,
               MISC_X_VALUE,
               MISC_X_VALUE
           ));

    psFree(my4DPoly);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psPolynomial4D structure.",
                testStatus);



    /*************************************************************************/
    /*  Allocate and initialize data structures                      */
    /*************************************************************************/
    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psDPolynomial1D structure.");

    my1DPolyD = psDPolynomial1DAlloc(AN, PS_POLYNOMIAL_ORD);
    for (a = 0; a < AN ; a++) {
        my1DPolyD->coeff[a] = MISC_FLOAT_NUMBER;
        my1DPolyD->coeffErr[a] = MISC_FLOAT_NUMBER;
        my1DPolyD->mask[a] = MISC_INT_NUMBER;
    }
    psMemCheckCorruption(1);

    printf("At (x) = (%f): %f\n", MISC_X_VALUE,
           psDPolynomial1DEval(
               my1DPolyD,
               MISC_X_VALUE
           ));

    psFree(my1DPolyD);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psDPolynomial1D structure.",
                testStatus);

    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psDPolynomial2D structure.");
    my2DPolyD = psDPolynomial2DAlloc(AN, BN, PS_POLYNOMIAL_ORD);
    for (a = 0; a < AN ; a++) {
        for (b = 0; b < BN ; b++) {
            my2DPolyD->coeff[a][b] = MISC_FLOAT_NUMBER;
            my2DPolyD->coeffErr[a][b] = MISC_FLOAT_NUMBER;
            my2DPolyD->mask[a][b] = MISC_INT_NUMBER;
        }
    }
    psMemCheckCorruption(1);

    printf("At (x, y) = (%f, %f): %f\n", MISC_X_VALUE, MISC_X_VALUE,
           psDPolynomial2DEval(
               my2DPolyD,
               MISC_X_VALUE,
               MISC_X_VALUE
           ));

    psFree(my2DPolyD);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psDPolynomial2D structure.",
                testStatus);



    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psDPolynomial3D structure.");
    my3DPolyD = psDPolynomial3DAlloc(AN, BN, CN, PS_POLYNOMIAL_ORD);
    for (a = 0; a < AN ; a++) {
        for (b = 0; b < BN ; b++) {
            for (c = 0; c < CN ; c++) {
                my3DPolyD->coeff[a][b][c] = MISC_FLOAT_NUMBER;
                my3DPolyD->coeffErr[a][b][c] = MISC_FLOAT_NUMBER;
                my3DPolyD->mask[a][b][c] = MISC_INT_NUMBER;
            }
        }
    }
    psMemCheckCorruption(1);

    printf("At (x, y, z) = (%f, %f, %f): %f\n", MISC_X_VALUE, MISC_X_VALUE,
           MISC_X_VALUE,
           psDPolynomial3DEval(
               my3DPolyD,
               MISC_X_VALUE,
               MISC_X_VALUE,
               MISC_X_VALUE
           ));

    psFree(my3DPolyD);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psDPolynomial3D structure.",
                testStatus);




    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psDPolynomial4D structure.");
    my4DPolyD = psDPolynomial4DAlloc(AN, BN, CN, DN, PS_POLYNOMIAL_ORD);
    for (a = 0; a < AN ; a++) {
        for (b = 0; b < BN ; b++) {
            for (c = 0; c < CN ; c++) {
                for (d = 0; d < DN ; d++) {
                    my4DPolyD->coeff[a][b][c][d] = MISC_FLOAT_NUMBER;
                    my4DPolyD->coeffErr[a][b][c][d] = MISC_FLOAT_NUMBER;
                    my4DPolyD->mask[a][b][c][d] = MISC_INT_NUMBER;
                }
            }
        }
    }
    psMemCheckCorruption(1);

    printf("At (w, x, y, z) = (%f, %f, %f, %f): %f\n", MISC_X_VALUE, MISC_X_VALUE,
           MISC_X_VALUE, MISC_X_VALUE,
           psDPolynomial4DEval(
               my4DPolyD,
               MISC_X_VALUE,
               MISC_X_VALUE,
               MISC_X_VALUE,
               MISC_X_VALUE
           ));

    psFree(my4DPolyD);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psDPolynomial4D structure.",
                testStatus);



    /*************************************************************************/
    /*  Allocate and initialize data structures                      */
    /*************************************************************************/
    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psPolynomial1D structure (CHEBYSHEV).");

    my1DPoly = psPolynomial1DAlloc(AN, PS_POLYNOMIAL_CHEB);
    for (a = 0; a < AN ; a++) {
        my1DPoly->coeff[a] = MISC_FLOAT_NUMBER;
        my1DPoly->coeffErr[a] = MISC_FLOAT_NUMBER;
        my1DPoly->mask[a] = MISC_INT_NUMBER;
    }
    psMemCheckCorruption(1);

    printf("At (x) = (%f): %f\n", MISC_X_VALUE,
           psPolynomial1DEval(
               my1DPoly,
               MISC_X_CHEB_VALUE
           ));

    psFree(my1DPoly);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psPolynomial1D structure (CHEBYSHEV).",
                testStatus);




    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psPolynomial2D structure (CHEBYSHEV).");
    my2DPoly = psPolynomial2DAlloc(AN, BN, PS_POLYNOMIAL_CHEB);
    for (a = 0; a < AN ; a++) {
        for (b = 0; b < BN ; b++) {
            my2DPoly->coeff[a][b] = MISC_FLOAT_NUMBER;
            my2DPoly->coeffErr[a][b] = MISC_FLOAT_NUMBER;
            my2DPoly->mask[a][b] = MISC_INT_NUMBER;
        }
    }
    psMemCheckCorruption(1);

    printf("At (x, y) = (%f, %f): %f\n", MISC_X_CHEB_VALUE, MISC_X_CHEB_VALUE,
           psPolynomial2DEval(
               my2DPoly,
               MISC_X_CHEB_VALUE,
               MISC_X_CHEB_VALUE
           ));

    psFree(my2DPoly);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psPolynomial2D structure (CHEBYSHEV).",
                testStatus);



    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psPolynomial3D structure (CHEBYSHEV).");
    my3DPoly = psPolynomial3DAlloc(AN, BN, CN, PS_POLYNOMIAL_CHEB);
    for (a = 0; a < AN ; a++) {
        for (b = 0; b < BN ; b++) {
            for (c = 0; c < CN ; c++) {
                my3DPoly->coeff[a][b][c] = MISC_FLOAT_NUMBER;
                my3DPoly->coeffErr[a][b][c] = MISC_FLOAT_NUMBER;
                my3DPoly->mask[a][b][c] = MISC_INT_NUMBER;
            }
        }
    }
    psMemCheckCorruption(1);

    printf("At (x, y, z) = (%f, %f, %f): %f\n", MISC_X_CHEB_VALUE, MISC_X_CHEB_VALUE,
           MISC_X_CHEB_VALUE,
           psPolynomial3DEval(
               my3DPoly,
               MISC_X_CHEB_VALUE,
               MISC_X_CHEB_VALUE,
               MISC_X_CHEB_VALUE
           ));

    psFree(my3DPoly);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psPolynomial3D structure (CHEBYSHEV).",
                testStatus);




    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psPolynomial4D structure (CHEBYSHEV).");
    my4DPoly = psPolynomial4DAlloc(AN, BN, CN, DN, PS_POLYNOMIAL_CHEB);
    for (a = 0; a < AN ; a++) {
        for (b = 0; b < BN ; b++) {
            for (c = 0; c < CN ; c++) {
                for (d = 0; d < DN ; d++) {
                    my4DPoly->coeff[a][b][c][d] = MISC_FLOAT_NUMBER;
                    my4DPoly->coeffErr[a][b][c][d] = MISC_FLOAT_NUMBER;
                    my4DPoly->mask[a][b][c][d] = MISC_INT_NUMBER;
                }
            }
        }
    }
    psMemCheckCorruption(1);

    printf("At (w, x, y, z) = (%f, %f, %f, %f): %f\n", MISC_X_CHEB_VALUE, MISC_X_CHEB_VALUE,
           MISC_X_CHEB_VALUE, MISC_X_CHEB_VALUE,
           psPolynomial4DEval(
               my4DPoly,
               MISC_X_CHEB_VALUE,
               MISC_X_CHEB_VALUE,
               MISC_X_CHEB_VALUE,
               MISC_X_CHEB_VALUE
           ));

    psFree(my4DPoly);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psPolynomial4D structure (CHEBYSHEV).",
                testStatus);



    /*************************************************************************/
    /*  Allocate and initialize data structures                      */
    /*************************************************************************/
    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psDPolynomial1D structure (CHEBYSHEV).");

    my1DPolyD = psDPolynomial1DAlloc(AN, PS_POLYNOMIAL_CHEB);
    for (a = 0; a < AN ; a++) {
        my1DPolyD->coeff[a] = MISC_FLOAT_NUMBER;
        my1DPolyD->coeffErr[a] = MISC_FLOAT_NUMBER;
        my1DPolyD->mask[a] = MISC_INT_NUMBER;
    }
    psMemCheckCorruption(1);

    printf("At (x) = (%f): %f\n", MISC_X_CHEB_VALUE,
           psDPolynomial1DEval(
               my1DPolyD,
               MISC_X_CHEB_VALUE
           ));

    psFree(my1DPolyD);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psDPolynomial1D structure (CHEBYSHEV).",
                testStatus);

    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psDPolynomial2D structure (CHEBYSHEV).");
    my2DPolyD = psDPolynomial2DAlloc(AN, BN, PS_POLYNOMIAL_CHEB);
    for (a = 0; a < AN ; a++) {
        for (b = 0; b < BN ; b++) {
            my2DPolyD->coeff[a][b] = MISC_FLOAT_NUMBER;
            my2DPolyD->coeffErr[a][b] = MISC_FLOAT_NUMBER;
            my2DPolyD->mask[a][b] = MISC_INT_NUMBER;
        }
    }
    psMemCheckCorruption(1);

    printf("At (x, y) = (%f, %f): %f\n", MISC_X_CHEB_VALUE, MISC_X_CHEB_VALUE,
           psDPolynomial2DEval(
               my2DPolyD,
               MISC_X_CHEB_VALUE,
               MISC_X_CHEB_VALUE
           ));

    psFree(my2DPolyD);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psDPolynomial2D structure (CHEBYSHEV).",
                testStatus);



    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psDPolynomial3D structure (CHEBYSHEV).");
    my3DPolyD = psDPolynomial3DAlloc(AN, BN, CN, PS_POLYNOMIAL_CHEB);
    for (a = 0; a < AN ; a++) {
        for (b = 0; b < BN ; b++) {
            for (c = 0; c < CN ; c++) {
                my3DPolyD->coeff[a][b][c] = MISC_FLOAT_NUMBER;
                my3DPolyD->coeffErr[a][b][c] = MISC_FLOAT_NUMBER;
                my3DPolyD->mask[a][b][c] = MISC_INT_NUMBER;
            }
        }
    }
    psMemCheckCorruption(1);

    printf("At (x, y, z) = (%f, %f, %f): %f\n", MISC_X_CHEB_VALUE, MISC_X_CHEB_VALUE,
           MISC_X_CHEB_VALUE,
           psDPolynomial3DEval(
               my3DPolyD,
               MISC_X_CHEB_VALUE,
               MISC_X_CHEB_VALUE,
               MISC_X_CHEB_VALUE
           ));

    psFree(my3DPolyD);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psDPolynomial3D structure (CHEBYSHEV).",
                testStatus);




    printPositiveTestHeader(stdout,
                            "psFunctions functions",
                            "Allocate/Deallocate the psDPolynomial4D structure (CHEBYSHEV).");
    my4DPolyD = psDPolynomial4DAlloc(AN, BN, CN, DN, PS_POLYNOMIAL_CHEB);
    for (a = 0; a < AN ; a++) {
        for (b = 0; b < BN ; b++) {
            for (c = 0; c < CN ; c++) {
                for (d = 0; d < DN ; d++) {
                    my4DPolyD->coeff[a][b][c][d] = MISC_FLOAT_NUMBER;
                    my4DPolyD->coeffErr[a][b][c][d] = MISC_FLOAT_NUMBER;
                    my4DPolyD->mask[a][b][c][d] = MISC_INT_NUMBER;
                }
            }
        }
    }
    psMemCheckCorruption(1);

    printf("At (w, x, y, z) = (%f, %f, %f, %f): %f\n", MISC_X_CHEB_VALUE, MISC_X_CHEB_VALUE,
           MISC_X_CHEB_VALUE, MISC_X_CHEB_VALUE,
           psDPolynomial4DEval(
               my4DPolyD,
               MISC_X_CHEB_VALUE,
               MISC_X_CHEB_VALUE,
               MISC_X_CHEB_VALUE,
               MISC_X_CHEB_VALUE
           ));

    psFree(my4DPolyD);
    memLeaks = psMemCheckLeaks(currentId,NULL,stderr,false);
    if (0 != memLeaks) {
        psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    }
    printFooter(stdout,
                "psFunctions functions",
                "Allocate/Deallocate the psDPolynomial4D structure (CHEBYSHEV).",
                testStatus);

    return (!testStatus);
}

