IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13124


Ignore:
Timestamp:
May 1, 2007, 6:20:06 PM (19 years ago)
Author:
gusciora
Message:

Added tabular file of all psLib functions in Chapter 6 of the SDRS (Data
Manipulation). Most of the test file changes in this check-in are fairly
cosmetic.

Location:
trunk/psLib/test/math
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/math/tap_psFunc01.c

    r10945 r13124  
    1010#include "tap.h"
    1111#include "pstap.h"
     12
    1213#define MY_MEAN 5.0
    1314#define MY_STDEV 2.0
     
    2122    plan_tests(4);
    2223
     24
    2325    // Test the psGaussian(): normalized version
    2426    {
    2527        psMemId id = psMemGetId();
    26 
    2728        bool errorFlag = false;
    2829        for (psS32 x = 0 ; x < (int) (MY_MEAN * 2.0) ; x++)
     
    3738        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    3839    }
     40
    3941
    4042    // Test the psGaussian(): non-normalized version
  • trunk/psLib/test/math/tap_psMatrix01.c

    r10816 r13124  
    44*
    55*  This test driver contains the following tests:
    6 *     Create input images
    76*     Transpose input image into output image
    87*     Transpose input image into auto allocated NULL output image
    9 *     Free input images
    108*
    119*  @author  Ross Harman, MHPCC
    1210*
    13 *  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
    14 *  @date  $Date: 2006-12-20 20:02:29 $
     11*  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
     12*  @date  $Date: 2007-05-02 04:20:06 $
    1513*
    1614*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5452psS32 main( psS32 argc, char* argv[] )
    5553{
    56     plan_tests(10);
    57     // Preliminary: Create input images
     54    plan_tests(14);
     55
     56
     57    // Verify with NULL input params
     58    {
     59        psMemId id = psMemGetId();
     60        psImage *outImage = psMatrixTranspose(NULL, NULL);
     61        ok(outImage == NULL, "psMatrixTranspose() returned NULL with NULL input params");
     62        psFree(outImage);
     63        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     64    }
     65
     66
     67    // Verify with incorrect input image type
     68    {
     69        psMemId id = psMemGetId();
     70        psImage *inImage = (psImage*)psImageAlloc(3, 3, PS_TYPE_S64);
     71        psImage *outImage = psMatrixTranspose(NULL, inImage);
     72        ok(outImage == NULL, "psMatrixTranspose() returned NULL with incorrect input image type");
     73        psFree(inImage);
     74        psFree(outImage);
     75        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     76    }
     77
     78
    5879    psImage *inImage = (psImage*)psImageAlloc(3, 3, PS_TYPE_F64);
    5980    psImage *outImage = (psImage*)psImageAlloc(3, 3, PS_TYPE_F64);
     
    79100    inImageF32->data.F32[2][2] = 9;
    80101
    81     // Test A - Transpose input image into output image
     102    // Transpose input image into output image
    82103    {
    83104        psMemId id = psMemGetId();
     
    99120    }
    100121
    101     // Test B - Transpose input image into auto allocated NULL output image
     122
     123    // Transpose input image into auto allocated NULL output image
    102124    {
    103125        psMemId id = psMemGetId();
    104         psImage *outImageNull = NULL;
    105         outImageNull = psMatrixTranspose(outImageNull, inImage);
     126        psImage *outImageNull = psMatrixTranspose(NULL, inImage);
    106127        ok(!check_matrix(outImageNull), "Output image data set correctly");
    107128
    108         psImage *outImageNullF32 = NULL;
    109         outImageNullF32 = psMatrixTranspose(outImageNullF32, inImageF32);
     129        psImage *outImageNullF32 = psMatrixTranspose(NULL, inImageF32);
    110130        check_matrix(outImageNullF32);
    111131        ok(!check_matrix(outImageNullF32), "Output image data set correctly");
  • trunk/psLib/test/math/tap_psMatrix02.c

    r12431 r13124  
    1212 *  @author  Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
    15  *  @date  $Date: 2007-03-14 00:39:51 $
     14 *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
     15 *  @date  $Date: 2007-05-02 04:20:06 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2424#include "pstap.h"
    2525
    26 psS32 main(psS32 argc,
    27            char* argv[])
     26int main(psS32 argc,
     27         char* argv[])
    2828{
    2929    psLogSetFormat("HLNM");
    3030    plan_tests(11);
    3131
    32     // Test A - Input pointer same as output pointer
     32    // Input pointer same as output pointer
     33    // XXX: This results in a seg fault.  It's not clear that passing this test is
     34    // a requirement.  However, we should probably fix the case where the input
     35    // image equals the output image.
    3336    if (0) {
    3437        psMemId id = psMemGetId();
     
    4043    }
    4144
    42     // Test B - Null input psImage
     45
     46    // Null input psImage
     47    // Merge with tap_psMatrix01.c, get rid of this test (redundant)
    4348    {
    4449        psMemId id = psMemGetId();
     
    5257    }
    5358
    54     // Test C - Incorrect type for input pointer
     59
     60    // Incorrect type for input pointer
     61    // Merge with tap_psMatrix01.c, get rid of this test (redundant)
    5562    {
    5663        psMemId id = psMemGetId();
     
    6572    }
    6673
    67     // Test D - Incorrect type for output pointer
     74
     75    // Incorrect type for output pointer
    6876    {
    6977        psMemId id = psMemGetId();
     
    7987    }
    8088
    81     // Test E - Matrix not square for output pointer
     89
     90    // Matrix not square for output pointer
    8291    // XXX: We should probably do more here.
    8392    {
     
    9099        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    91100    }
    92     return 0;
    93101}
  • trunk/psLib/test/math/tap_psMinimizeLMM.c

    r10945 r13124  
    22    This routine must ensure that psMinimizeLM() works correctly.
    33 
    4     XXX: This code needs a lot of additional test case work.
    5          The minimization currently (always?) fails and we don't
    6          attempt to check the output values.
     4    XXX: This code needs a lot of additional test case work.  The minimization
     5         currently fails and we don't attempt to check the output values.
     6    XXX: Add tests for
     7        covar arg set to non-NULL
     8        constraint set to non-NULL
     9        Set x->vectors to NULL, or use wrong types
     10        yWt (errors) vector set to incorrect size, type.
    711 *****************************************************************************/
    812#include <stdio.h>
     
    1923float expectedParm[NUM_PARAMS];
    2024
    21 
     25// y = p2 + p0 * e^( x0^2 + x1^2 / (2 * p1^2) )
    2226float function(const psVector *params, const psVector *x)
    2327{
     
    3539
    3640
    37 /*****************************************************************************
    38 fitFunc():
    39     sum = param[0] * x[0] * x[1] +
    40           param[1] * x[0] +
    41           param[2] * x[0]^2 +
    42           param[3] * x[1] +
    43           param[4] * x[1]^2
    44  
    45  *****************************************************************************/
    4641psF32 fitFunc(psVector *deriv,
    4742              psVector *params,
     
    5651}
    5752
     53
    5854#define NUM_ITER 10
    5955#define TOL  20.0
     
    6258    psLogSetFormat("HLNM");
    6359    psLogSetLevel(PS_LOG_INFO);
    64     plan_tests(2);
     60    plan_tests(34);
     61
     62
    6563    // Test psMinimizationAlloc()
    6664    {
     
    7977    }
    8078
    81     /*
    82         // Test psMinConstrainAlloc()
    83         {
    84             psMemId id = psMemGetId();
    85             psMinConstrain *tmp = psMinConstrainAlloc(NUM_ITER, TOL);
    86             ok(tmp != NULL. "psMinConstrainAlloc() returned non-NULL");
    87             skip_start(tmp == NULL, 4, "Skipping tests because psMinConstrainAlloc() failed");
    88             ok(tmp->paramMask == NULL, "psMinConstrainAlloc() properly set ->paramMask");
    89             ok(tmp->paramMax == NULL, "psMinConstrainAlloc() properly set ->paramMax");
    90             ok(tmp->paramMin == NULL, "psMinConstrainAlloc() properly set ->paramMin");
    91             ok(tmp->paramDelta == NULL, "psMinConstrainAlloc() properly set ->paramDelta");
    92             psFree(tmp);
    93             skip_end();
    94             ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    95         }
    96     */
    97 
    98     // Test psMinimizeLMChi2()
     79
     80    // Test psMinConstraintAlloc()
     81    {
     82        psMemId id = psMemGetId();
     83        psMinConstraint *tmp = psMinConstraintAlloc();
     84        ok(tmp != NULL, "psMinConstraintAlloc() returned non-NULL");
     85        skip_start(tmp == NULL, 2, "Skipping tests because psMinConstraintAlloc() failed");
     86        ok(tmp->paramMask == NULL, "psMinConstraintAlloc() properly set ->paramMask");
     87        ok(tmp->checkLimits == NULL, "psMinConstraintAlloc() properly set ->checkLimits");
     88        psFree(tmp);
     89        skip_end();
     90        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     91    }
     92
     93
     94    // Test psMinimizeLMChi2(): unallowed input parameters.
     95    {
     96        psMemId id = psMemGetId();
     97        psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 1); // Random number generator; using known seed
     98        psMinimization *min = psMinimizationAlloc(NUM_ITERATIONS, ERR_TOL);
     99        psArray *ordinates = psArrayAlloc(NUM_DATA_POINTS);
     100        psVector *coordinates = psVectorAlloc(NUM_DATA_POINTS, PS_TYPE_F32);
     101        psVector *coordinatesF64 = psVectorAlloc(NUM_DATA_POINTS, PS_TYPE_F64);
     102        psVector *errors = psVectorAlloc(NUM_DATA_POINTS, PS_TYPE_F32);
     103        psVector *params = psVectorAlloc(NUM_PARAMS, PS_TYPE_F32);
     104        psVector *paramsF64 = psVectorAlloc(NUM_PARAMS, PS_TYPE_F64);
     105        psVector *trueParams = psVectorAlloc(NUM_PARAMS, PS_TYPE_F32);
     106
     107        // Test with psMinimization set to NULL
     108        {
     109            psMemId id = psMemGetId();
     110            bool tmpBool = psMinimizeLMChi2(NULL, NULL, params, NULL, ordinates,
     111                           coordinates, errors, (psMinimizeLMChi2Func)fitFunc);
     112            ok(!tmpBool, "psMinimizeLMChi2() returned FALSE with NULL psMinimization");
     113            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     114        }
     115
     116
     117        // Test with params set to NULL
     118        {
     119            psMemId id = psMemGetId();
     120            bool tmpBool = psMinimizeLMChi2(min, NULL, NULL, NULL, ordinates,
     121                           coordinates, errors, (psMinimizeLMChi2Func)fitFunc);
     122            ok(!tmpBool, "psMinimizeLMChi2() returned FALSE with NULL params");
     123            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     124        }
     125
     126
     127        // Test with params wrong type
     128        {
     129            psMemId id = psMemGetId();
     130            bool tmpBool = psMinimizeLMChi2(min, NULL, paramsF64, NULL, ordinates,
     131                           coordinates, errors, (psMinimizeLMChi2Func)fitFunc);
     132            ok(!tmpBool, "psMinimizeLMChi2() returned FALSE with NULL params");
     133            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     134        }
     135
     136
     137        // Test with ordinates (x) set to NULL
     138        {
     139            psMemId id = psMemGetId();
     140            bool tmpBool = psMinimizeLMChi2(min, NULL, params, NULL, NULL,
     141                           coordinates, errors, (psMinimizeLMChi2Func)fitFunc);
     142            ok(!tmpBool, "psMinimizeLMChi2() returned FALSE with NULL ordinates (x)");
     143            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     144        }
     145
     146
     147        // Test with coordinates (y) set to NULL
     148        {
     149            psMemId id = psMemGetId();
     150            bool tmpBool = psMinimizeLMChi2(min, NULL, params, NULL, ordinates,
     151                           NULL, errors, (psMinimizeLMChi2Func)fitFunc);
     152            ok(!tmpBool, "psMinimizeLMChi2() returned FALSE with NULL coordinates (y)");
     153            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     154        }
     155
     156
     157        // Test with coordinates (y) wrong type (F64)
     158        {
     159            psMemId id = psMemGetId();
     160            bool tmpBool = psMinimizeLMChi2(min, NULL, params, NULL, ordinates,
     161                           coordinatesF64, errors, (psMinimizeLMChi2Func)fitFunc);
     162            ok(!tmpBool, "psMinimizeLMChi2() returned FALSE with coordinates (y) wrong type");
     163            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     164        }
     165
     166
     167        // Test with ordinates and coordinates wrong size
     168        {
     169            psMemId id = psMemGetId();
     170            coordinates->n--;
     171            bool tmpBool = psMinimizeLMChi2(min, NULL, params, NULL, ordinates,
     172                           coordinates, errors, (psMinimizeLMChi2Func)fitFunc);
     173            ok(!tmpBool, "psMinimizeLMChi2() returned FALSE with NULL psMinimization");
     174            coordinates->n++;
     175            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     176        }
     177
     178
     179        // Test with function set to NULL
     180        {
     181            psMemId id = psMemGetId();
     182            bool tmpBool = psMinimizeLMChi2(min, NULL, params, NULL, ordinates,
     183                           coordinates, errors, NULL);
     184            ok(!tmpBool, "psMinimizeLMChi2() returned FALSE with NULL fit function");
     185            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     186        }
     187
     188        psFree(min);
     189        psFree(params);
     190        psFree(paramsF64);
     191        psFree(trueParams);
     192        psFree(ordinates);
     193        psFree(coordinates);
     194        psFree(coordinatesF64);
     195        psFree(errors);
     196        psFree(rng);
     197        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     198    }
     199
     200
     201    // Test psMinimizeLMChi2() with legitimate input values
     202    // Currently this fails, and we do not attempt to verify output
    99203    {
    100204        psMemId id = psMemGetId();
     
    158262        }
    159263        printf("Mean relative difference is %f\n", diff/(float)NUM_DATA_POINTS);
    160 
     264        skip_end();
    161265        psFree(min);
    162266        psFree(params);
     
    166270        psFree(errors);
    167271        psFree(rng);
    168         skip_end();
    169         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    170     }
    171 }
     272        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     273    }
     274}
  • trunk/psLib/test/math/tap_psMinimizePowell.c

    r13123 r13124  
    99    XXX: Also, the test currently fails because of memory corruption in
    1010         psMinimizePowell().
     11    XXX: The unallowed input parameter tests could be more extensive
    1112 *****************************************************************************/
    1213#include <stdio.h>
     
    7475{
    7576    psLogSetFormat("HLNM");
    76     plan_tests(1);
     77    plan_tests(8);
    7778
    7879    // Check for various errors on unallowed input parameters
    7980    {
    80         psMemId id = psMemGetId();
    81 
    8281        psVector *myParams = psVectorAlloc(NUM_PARAMS, PS_TYPE_F32);
    8382        psVector *myParamMask = psVectorAlloc(NUM_PARAMS, PS_TYPE_U8);
     
    8584        psArray *myCoords = psArrayAlloc(N);
    8685
    87         for (psS32 i=0;i<N;i++)
     86        // Following should generate error for NULL minimize
    8887        {
    89             myCoords->data[i] = (psPtr *) psVectorAlloc(2, PS_TYPE_F32);
    90             ((psVector *) (myCoords->data[i]))->data.F32[0] = (float) (i+10);
    91             ((psVector *) (myCoords->data[i]))->data.F32[1] = (float) (i+3);
    92             ((psVector *) (myCoords->data[i]))->n++;
    93         }
    94         for (psS32 i=0;i<NUM_PARAMS;i++)
    95         {
    96             expectedParm[i] = 2.32 + (float) (2 * i);
    97             myParams->data.F32[i] = 0.0;
    98             myParams->data.F32[i] = (float) i;
    99             myParamMask->data.U8[i] = 0;
    100             myParams->n++;
    101             myParamMask->n++;
     88            psMemId id = psMemGetId();
     89            bool tmpBool = psMinimizePowell(NULL, myParams, myParamMask, myCoords,
     90                                           (psMinimizePowellFunc) myFunc);
     91            ok(!tmpBool, "psMinimizePowell() returned FALSE with NULL psMinimize param");
     92            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    10293        }
    10394
    104         // Following should generate error for null minimize
    105         if (0)
     95
     96        // Following should generate error for NULL parameter vector
    10697        {
    107             psMinimizePowell(NULL, myParams, myParamMask, myCoords, (psMinimizePowellFunc) myFunc);
     98            psMemId id = psMemGetId();
     99            bool tmpBool = psMinimizePowell(min, NULL, myParamMask, myCoords,(psMinimizePowellFunc) myFunc);
     100            ok(!tmpBool, "psMinimizePowell() returned FALSE with NULL parameter param");
     101            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    108102        }
    109103
    110         // Following should generate error for null parameter vector
    111         if (0)
     104
     105        // Following should generate error for NULL coords
    112106        {
    113             psMinimizePowell(min, NULL, myParamMask, myCoords,(psMinimizePowellFunc) myFunc);
     107            psMemId id = psMemGetId();
     108            bool tmpBool = psMinimizePowell(min, myParams, myParamMask, NULL, (psMinimizePowellFunc) myFunc);
     109            ok(!tmpBool, "psMinimizePowell() returned FALSE with NULL coords param");
     110            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    114111        }
    115112
    116         // Following should generate error for null coords
    117         if (0)
     113
     114        // Following should generate error for NULL function
    118115        {
    119             psMinimizePowell(min, myParams, myParamMask, NULL, (psMinimizePowellFunc) myFunc);
    120         }
    121 
    122         // Following should generate error for null function
    123         if (0)
    124         {
    125             psMinimizePowell(min, myParams, myParamMask, myCoords, NULL);
     116            psMemId id = psMemGetId();
     117            bool tmpBool = psMinimizePowell(min, myParams, myParamMask, myCoords, NULL);
     118            ok(!tmpBool, "psMinimizePowell() returned FALSE with NULL function param");
     119            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    126120        }
    127121
     
    130124        psFree(min);
    131125        psFree(myCoords);
    132         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    133126    }
    134127
     128
    135129    // Powell minimize with parameter mask
     130    // XXX: This function aborts with a memory corruption error at around line
     131    // 60 of psMinimizePowell.c, at the psFree(v):
     132    //    if (fabs(baseFuncVal - currFuncVal) <= min->tol) {
     133    //        psFree(v);
     134    //        psFree(pQP);
    136135    if (0) {
    137136        psMemId id = psMemGetId();
     
    155154        }
    156155
    157         bool tmpBool = psMinimizePowell(min, myParams, myParamMask, myCoords,
     156        bool tmpBool = psMinimizePowell(min, myParams, NULL, myCoords,
    158157                                        (psMinimizePowellFunc) myFunc);
    159158        ok(tmpBool, "psMinimizePowell() returned sucessfully");
     
    184183    }
    185184
    186     // Powell minimize with parameter mask
    187     // The only difference from the previous block is that paramMask is now NULL
    188     if (0) {
    189         psMemId id = psMemGetId();
    190         psVector *myParams = psVectorAlloc(NUM_PARAMS, PS_TYPE_F32);
    191         psMinimization *min = psMinimizationAlloc(100, 0.01);
    192         psArray *myCoords = psArrayAlloc(N);
    193         bool tmpBool;
    194 
    195         myCoords->n = N;
    196         for (psS32 i=0;i<N;i++)
    197         {
    198             myCoords->data[i] = (psPtr *) psVectorAlloc(2, PS_TYPE_F32);
    199             ((psVector *) (myCoords->data[i]))->data.F32[0] = (float) (i+10);
    200             ((psVector *) (myCoords->data[i]))->data.F32[1] = (float) (i+3);
    201         }
    202         for (psS32 i=0;i<NUM_PARAMS;i++)
    203         {
    204             expectedParm[i] = 2.32 + (float) (2 * i);
    205             myParams->data.F32[i] = 0.0;
    206             myParams->data.F32[i] = (float) i;
    207             myParams->n++;
    208         }
    209 
    210         tmpBool = psMinimizePowell(min, myParams, NULL, myCoords,
    211                                    (psMinimizePowellFunc) myFunc);
    212         ok(tmpBool, "psMinimizePowell() returned sucessfully");
    213         skip_start(!tmpBool, 0, "Skipping tests because psMinimizePowell() failed");
    214 
    215         printf("\nThe minimum is %f (expected: %f)\n", min->value, MIN_VALUE);
    216         for (psS32 i=0;i<NUM_PARAMS;i++)
    217         {
    218             printf("Parameter %d at the minimum is %.1f (expected: %.1f)\n", i,
    219                    myParams->data.F32[i], expectedParm[i]);
    220 
    221             if (fabs(myParams->data.F32[i] - expectedParm[i]) > fabs(ERROR_TOLERANCE * expectedParm[i])) {
    222                 printf("ERROR: Parameter %d: (%.1f), expected was (%.1f)\n",
    223                        i, myParams->data.F32[i], expectedParm[i]);
    224                 testStatus = false;
    225             } else {
    226                 printf("Parameter %d: (%.1f), expected was (%.1f)\n",
    227                        i, myParams->data.F32[i], expectedParm[i]);
    228             }
    229         }
    230         psFree(myCoords);
    231         psFree(myParams);
    232         psFree(min);
    233         skip_end();
    234         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    235     }
     185    // XXX: Add tests with active parameter mask
    236186}
  • trunk/psLib/test/math/tap_psPolyFit1D.c

    r11686 r13124  
    88 
    99XXX: Try null stats.
    10  
    11 XXX: The tests with "Some Vectors NULL" fail as of 2006/12, they had passed
    12 previously as of 2006/02.  They are commented out for now.
    1310 *****************************************************************************/
    1411#include <stdio.h>
     
    352349{
    353350    psLogSetFormat("HLNM");
    354     psTraceSetLevel(".", 0);
    355     psTraceSetLevel("psVectorClipFitPolynomial1D", 0);
    356     psTraceSetLevel("VectorFitPolynomial1DOrd", 0);
    357     psTraceSetLevel("VectorFitPolynomial1DCheb", 0);
    358     psTraceSetLevel("vectorFitPolynomial1DCheb", 0);
    359     psTraceSetLevel("vectorFitPolynomial1DChebSlow", 0);
    360     psTraceSetLevel("vectorFitPolynomial1DChebFast", 0);
    361     psTraceSetLevel("psVectorFitPolynomial1D", 0);
    362     psTraceSetLevel("p_psCreateChebyshevPolys", 0);
    363 
     351    psLogSetLevel(PS_LOG_INFO);
    364352    plan_tests(64);
    365353
     
    368356    //
    369357    // All Vectors non-NULL
    370 
    371358    ok(genericTest(TS00_MASK_U8 | TS00_FERR_F32 | TS00_X_F32 | TS00_F_F32 | TS00_POLY_ORD, POLY_ORDER, NUM_DATA, true), "F32 tests: Ordinary polys, non-clip fit");
    372359    // Some Vectors NULL
     
    382369    ok(genericTest(TS00_MASK_U8 | TS00_FERR_F32 | TS00_X_S32 | TS00_F_F32 | TS00_POLY_ORD, POLY_ORDER, NUM_DATA, false), "F32 tests: Ordinary polys, non-clip fit, Unallowable vector types");
    383370    ok(genericTest(TS00_MASK_U8 | TS00_FERR_F32 | TS00_X_F32 | TS00_F_S32 | TS00_POLY_ORD, POLY_ORDER, NUM_DATA, false), "F32 tests: Ordinary polys, non-clip fit, Unallowable vector types");
    384 
    385371    // Mismatch vector types
    386372    ok(genericTest(TS00_MASK_S32 | TS00_FERR_F32 | TS00_X_F32 | TS00_F_F32 | TS00_POLY_ORD, POLY_ORDER, NUM_DATA, false), "F32 tests: Ordinary polys, non-clip fit, Mismatch vector types");
     
    392378    //
    393379    // All Vectors non-NULL
    394 
    395380    ok(genericTest(TS00_MASK_U8 | TS00_FERR_F64 | TS00_X_F64 | TS00_F_F64 | TS00_POLY_ORD, POLY_ORDER, NUM_DATA, true), "F64 tests: Ordinary polys, non-clip fit");
    396381    // Some Vectors NULL
  • trunk/psLib/test/math/tap_psPolyFit2D.c

    r12199 r13124  
    363363{
    364364    psLogSetFormat("HLNM");
    365     psTraceSetLevel(".", 0);
    366     psTraceSetLevel("psVectorClipFitPolynomial2D", 0);
    367     psTraceSetLevel("VectorFitPolynomial2DOrd", 0);
    368     psTraceSetLevel("psVectorFitPolynomial2D", 0);
    369 
     365    psLogSetLevel(PS_LOG_INFO);
    370366    plan_tests(44);
    371367
  • trunk/psLib/test/math/tap_psPolyFit3D.c

    r11686 r13124  
    413413{
    414414    psLogSetFormat("HLNM");
    415     psTraceSetLevel(".", 0);
    416     psTraceSetLevel("psVectorClipFitPolynomial3D", 0);
    417     psTraceSetLevel("VectorFitPolynomial3DOrd", 0);
    418     psTraceSetLevel("psVectorFitPolynomial3D", 0);
    419 
     415    psLogSetLevel(PS_LOG_INFO);
    420416    plan_tests(52);
    421417
  • trunk/psLib/test/math/tap_psPolyFit4D.c

    r11686 r13124  
    471471{
    472472    psLogSetFormat("HLNM");
    473     psTraceSetLevel(".", 0);
    474     psTraceSetLevel("psVectorClipFitPolynomial4D", 0);
    475     psTraceSetLevel("VectorFitPolynomial4DOrd", 0);
    476     psTraceSetLevel("psVectorFitPolynomial4D", 0);
    477 
     473    psLogSetLevel(PS_LOG_INFO);
    478474    plan_tests(60);
    479475
  • trunk/psLib/test/math/tap_psPolynomialEval1D.c

    r12781 r13124  
    44*  ORD and CHEB type polynomials.
    55*
    6 *  @version  $Revision: 1.6 $  $Name: not supported by cvs2svn $
    7 *  @date  $Date: 2007-04-10 21:09:30 $
     6*  @version  $Revision: 1.7 $  $Name: not supported by cvs2svn $
     7*  @date  $Date: 2007-05-02 04:20:06 $
    88*
    99*  XXX: Probably should test single- and multi-dimensional polynomials in
     
    4444    psLogSetFormat("HLNM");
    4545    psLogSetLevel(PS_LOG_INFO);
    46     plan_tests(24);
     46    plan_tests(30);
     47
     48
     49    // Allocate polynomial with unallowable type
     50    {
     51        psMemId id = psMemGetId();
     52        psPolynomial1D* polyOrd = psPolynomial1DAlloc(99, TERMS-1);
     53        ok(polyOrd==NULL, "psPolynomial1DAlloc() returned NULL with unallowed type");
     54        psFree(polyOrd);
     55        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     56    }
     57
     58
     59    // Evaluate a NULL polynomial
     60    {
     61        psMemId id = psMemGetId();
     62        psF64 result = psPolynomial1DEval(NULL, 0.0);
     63        ok(isnan(result), "psPolynomial1DEval() returned NAN with NULL psPolynomial");
     64        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     65    }
     66
    4767
    4868    // Allocate and evaluate an ordinary polynomial structure
     
    7595        skip_end();
    7696        psFree(polyOrd);
    77         ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
     97        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    7898    }
    7999
     
    107127
    108128
    109     // Allocate polynomial with unallowable type
    110     // XXX: This is wierd: why the skip()?
    111     {
    112         psMemId id = psMemGetId();
    113         psPolynomial1D* polyOrd = psPolynomial1DAlloc(99, TERMS-1);
    114         ok(polyOrd==NULL, "psPolynomial1DAlloc() returned NULL, as expected");
    115         skip_start(polyOrd!=NULL, 1, "Skipping tests because psPolynomial1DAlloc() failed");
    116 
    117         // Attempt to evaluation invalid polynomial type
    118         psF64 result = psPolynomial1DEval(polyOrd, 0.0);
    119         ok(isnan(result), "psPolynomial1DEval() did not return NAN, as expected");
    120         skip_end();
    121         psFree(polyOrd);
    122         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    123     }
    124 
    125 
    126129    // Allocate polynomial, test the psPolynomial1DEvalVector() routines
    127130    {
     
    162165        ok(!errorFlag, "psPolynomial1DEvalVector() produced the correct answers");
    163166
    164         // Attempt to invoke function with null polynomial
    165         ok(psPolynomial1DEvalVector(NULL, inputOrd) == NULL, "psPolynomial1DEvalVector() produced NULL when called with NULL polynomial");
    166 
    167         // Attempt to invoke function with null input vector
    168         ok(psPolynomial1DEvalVector(polyOrd,NULL) == NULL, "psPolynomial1DEvalVector() produced NULL when called with NULL input vector");
     167        // Attempt to invoke function with NULL polynomial
     168        {
     169            psMemId id = psMemGetId();
     170            ok(psPolynomial1DEvalVector(NULL, inputOrd) == NULL, "psPolynomial1DEvalVector() produced NULL when called with NULL polynomial");
     171            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     172        }
     173
     174        // Attempt to invoke function with NULL input vector
     175        {
     176            psMemId id = psMemGetId();
     177            ok(psPolynomial1DEvalVector(polyOrd, NULL) == NULL, "psPolynomial1DEvalVector() produced NULL when called with NULL input vector");
     178            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     179        }
    169180
    170181        // Attempt to invoke function with a non F64 type input vector
    171         inputOrd->type.type = PS_TYPE_U8;
    172         ok(psPolynomial1DEvalVector(polyOrd,inputOrd) == NULL, "psPolynomial1DEvalVector() produced NULL when called with non F64 input vector");
     182        {
     183            psMemId id = psMemGetId();
     184            inputOrd->type.type = PS_TYPE_U8;
     185            ok(psPolynomial1DEvalVector(polyOrd,inputOrd) == NULL, "psPolynomial1DEvalVector() produced NULL when called with non F64 input vector");
     186            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     187        }
    173188        psFree(outputOrd);
    174189        skip_end();
     
    216231        ok(!errorFlag, "psPolynomial1DEvalVector() produced the correct answers");
    217232
    218         // Attempt to invoke function with null input vector
    219         ok(psPolynomial1DEvalVector(polyCheb,NULL) == NULL, "psPolynomial1DEvalVector() produced NULL when called with NULL input vector");
     233
     234        // Attempt to invoke function with NULL input vector
     235        {
     236            psMemId id = psMemGetId();
     237            ok(psPolynomial1DEvalVector(polyCheb,NULL) == NULL, "psPolynomial1DEvalVector() produced NULL when called with NULL input vector");
     238            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     239        }
     240
    220241
    221242        // Attempt to invoke function with a non F64 type input vector
    222         inputCheb->type.type = PS_TYPE_U8;
    223         ok(psPolynomial1DEvalVector(polyCheb,inputCheb) == NULL, "psPolynomial1DEvalVector() produced NULL when called with non F64 input vector");
     243        {
     244            psMemId id = psMemGetId();
     245            inputCheb->type.type = PS_TYPE_U8;
     246            ok(psPolynomial1DEvalVector(polyCheb,inputCheb) == NULL, "psPolynomial1DEvalVector() produced NULL when called with non F64 input vector");
     247            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     248        }
     249
     250
    224251        psFree(outputCheb);
    225252        skip_end();
  • trunk/psLib/test/math/tap_psPolynomialEval2D.c

    r11423 r13124  
    44*  ORD and CHEB type polynomials.
    55*
    6 *  @version  $Revision: 1.5 $  $Name: not supported by cvs2svn $
    7 *  @date  $Date: 2007-01-30 04:52:42 $
     6*  @version  $Revision: 1.6 $  $Name: not supported by cvs2svn $
     7*  @date  $Date: 2007-05-02 04:20:06 $
    88*
    99* Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    7070    psLogSetFormat("HLNM");
    7171    psLogSetLevel(PS_LOG_INFO);
    72     plan_tests(28);
     72    plan_tests(40);
     73
     74
     75    // Allocate polynomial with unallowed type
     76    {
     77        psMemId id = psMemGetId();
     78        psPolynomial2D* polyOrd = psPolynomial2DAlloc(99, TERMS-1, TERMS-1);
     79        ok(polyOrd == NULL, "psPolynomial2DAlloc() returned NULL with unallowed tpye");
     80        psFree(polyOrd);
     81        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     82    }
     83
     84
     85    // Evaluate a NULL polynomial
     86    {
     87        psMemId id = psMemGetId();
     88        psF64 result = psPolynomial2DEval(NULL, 0.0, 0.0);
     89        ok(isnan(result), "psPolynomial2DEval() returned NAN with NULL psPolynomial");
     90        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     91    }
     92
    7393
    7494    // Allocate and evaluate an ordinary polynomial structure
     
    138158        skip_end();
    139159        psFree(polyCheb);
    140         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    141     }
    142 
    143 
    144     // Allocate polynomial with unallowed type
    145     {
    146         psMemId id = psMemGetId();
    147         psPolynomial2D* polyOrd = psPolynomial2DAlloc(99, TERMS-1, TERMS-1);
    148         ok(polyOrd == NULL, "psPolynomial2DAlloc() returned NULL with unallowed tpye");
    149         //        skip_start(polyOrd == NULL, 1, "Skipping tests because psPolynomial2DAlloc() failed");
    150         //        // Attempt to evaluate invalid polynomial type
    151         //        psF64 result = psPolynomial2DEval(polyOrd,0.0, 0.0);
    152         //        ok(isnan(result), "psPolynomial2DEval() did not return NAN, as expected");
    153         //        skip_end();
    154         psFree(polyOrd);
    155160        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    156161    }
     
    200205        ok(!errorFlag, "psPolynomial2DEvalVector() produced the correct answers");
    201206
    202         // Attempt to invoke function with null polynomial
    203         ok(psPolynomial2DEvalVector(NULL, inputOrdX, inputOrdY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with NULL polynomial");
    204 
    205         // Attempt to invoke function with null input vector
    206         ok(psPolynomial2DEvalVector(polyOrd,NULL,inputOrdY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with NULL input vector");
    207 
    208         // Attempt to invoke function with null input vector
    209         ok(psPolynomial2DEvalVector(polyOrd,inputOrdX,NULL) == NULL, "psPolynomial2DEvalVector() produced NULL when called with NULL input vector");
    210 
     207
     208        // Attempt to invoke function with NULL polynomial
     209        {
     210            psMemId id = psMemGetId();
     211            ok(psPolynomial2DEvalVector(NULL, inputOrdX, inputOrdY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with NULL polynomial");
     212            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     213        }
     214
     215
     216        // Attempt to invoke function with NULL input vector
     217        {
     218            psMemId id = psMemGetId();
     219            ok(psPolynomial2DEvalVector(polyOrd,NULL,inputOrdY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with NULL input vector");
     220            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     221        }
     222
     223   
     224        // Attempt to invoke function with NULL input vector
     225        {
     226            psMemId id = psMemGetId();
     227            ok(psPolynomial2DEvalVector(polyOrd,inputOrdX,NULL) == NULL, "psPolynomial2DEvalVector() produced NULL when called with NULL input vector");
     228            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     229        }
     230
     231   
    211232        // Attempt to invoke function with a non F64 type input vector
    212         inputOrdX->type.type = PS_TYPE_U8;
    213         ok(psPolynomial2DEvalVector(polyOrd,inputOrdX,inputOrdY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with non F64 input vector");
     233        {
     234            psMemId id = psMemGetId();
     235            inputOrdX->type.type = PS_TYPE_U8;
     236            ok(psPolynomial2DEvalVector(polyOrd,inputOrdX,inputOrdY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with non F64 input vector");
     237            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     238        }
     239
    214240        inputOrdX->type.type = PS_TYPE_F64;
    215 
    216241        // Attempt to invoke function with a non F64 type input vector
    217         inputOrdY->type.type = PS_TYPE_U8;
    218         ok(psPolynomial2DEvalVector(polyOrd,inputOrdX, inputOrdY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with non F64 input vector");
     242        {
     243            psMemId id = psMemGetId();
     244            inputOrdY->type.type = PS_TYPE_U8;
     245            ok(psPolynomial2DEvalVector(polyOrd,inputOrdX, inputOrdY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with non F64 input vector");
     246            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     247        }
    219248        psFree(outputOrd);
    220249        skip_end();
     
    227256
    228257
    229 
    230 
    231 
    232258    // Allocate polynomial, test the psPolynomial2DEvalVector() routines
    233259    {
     
    274300        ok(!errorFlag, "psPolynomial2DEvalVector() produced the correct answers");
    275301
    276         // Attempt to invoke function with null polynomial
    277         ok(psPolynomial2DEvalVector(NULL, inputChebX, inputChebY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with NULL polynomial");
    278 
    279         // Attempt to invoke function with null input vector
    280         ok(psPolynomial2DEvalVector(polyCheb,NULL,inputChebY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with NULL input vector");
    281 
    282         // Attempt to invoke function with null input vector
    283         ok(psPolynomial2DEvalVector(polyCheb,inputChebX,NULL) == NULL, "psPolynomial2DEvalVector() produced NULL when called with NULL input vector");
     302        // Attempt to invoke function with NULL polynomial
     303        {
     304            psMemId id = psMemGetId();
     305            ok(psPolynomial2DEvalVector(NULL, inputChebX, inputChebY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with NULL polynomial");
     306            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     307        }
     308
     309
     310        // Attempt to invoke function with NULL input vector
     311        {
     312            psMemId id = psMemGetId();
     313            ok(psPolynomial2DEvalVector(polyCheb,NULL,inputChebY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with NULL input vector");
     314            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     315        }
     316
     317
     318        // Attempt to invoke function with NULL input vector
     319        {
     320            psMemId id = psMemGetId();
     321            ok(psPolynomial2DEvalVector(polyCheb,inputChebX,NULL) == NULL, "psPolynomial2DEvalVector() produced NULL when called with NULL input vector");
     322            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     323        }
     324
    284325
    285326        // Attempt to invoke function with a non F64 type input vector
    286         inputChebX->type.type = PS_TYPE_U8;
    287         ok(psPolynomial2DEvalVector(polyCheb,inputChebX,inputChebY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with non F64 input vector");
     327        {
     328            psMemId id = psMemGetId();
     329            inputChebX->type.type = PS_TYPE_U8;
     330            ok(psPolynomial2DEvalVector(polyCheb,inputChebX,inputChebY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with non F64 input vector");
     331            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     332        }
     333
     334
    288335        inputChebX->type.type = PS_TYPE_F64;
    289336
    290337        // Attempt to invoke function with a non F64 type input vector
    291         inputChebY->type.type = PS_TYPE_U8;
    292         ok(psPolynomial2DEvalVector(polyCheb,inputChebX, inputChebY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with non F64 input vector");
     338        {
     339            psMemId id = psMemGetId();
     340            inputChebY->type.type = PS_TYPE_U8;
     341            ok(psPolynomial2DEvalVector(polyCheb,inputChebX, inputChebY) == NULL, "psPolynomial2DEvalVector() produced NULL when called with non F64 input vector");
     342            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     343        }
    293344        psFree(outputCheb);
    294345        skip_end();
  • trunk/psLib/test/math/tap_psPolynomialEval3D.c

    r11423 r13124  
    44*  ORD and CHEB type polynomials.
    55*
    6 *  @version  $Revision: 1.5 $  $Name: not supported by cvs2svn $
    7 *  @date  $Date: 2007-01-30 04:52:42 $
     6*  @version  $Revision: 1.6 $  $Name: not supported by cvs2svn $
     7*  @date  $Date: 2007-05-02 04:20:06 $
    88*
    99* Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    121121    psLogSetFormat("HLNM");
    122122    psLogSetLevel(PS_LOG_INFO);
    123     plan_tests(32);
     123    plan_tests(44);
     124
     125
     126    // Allocate polynomial with unallowed type
     127    {
     128        psMemId id = psMemGetId();
     129        psPolynomial3D* polyOrd = psPolynomial3DAlloc(99, TERMS-1, TERMS-1, TERMS-1);
     130        ok(polyOrd == NULL, "psPolynomial3DAlloc() returned NULL with unallowed type");
     131        psFree(polyOrd);
     132        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     133
     134    }
     135
     136
     137    // Evaluate NULL polynomial
     138    {
     139        psMemId id = psMemGetId();
     140        psF64 result = psPolynomial3DEval(NULL, 0.0, 0.0, 0.0);
     141        ok(isnan(result), "psPolynomial3DEval() returned NAN with NULL polynomial");
     142        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     143
     144    }
     145
    124146
    125147    // Allocate and evaluate an ordinary polynomial structure
     
    202224
    203225
    204 
    205     // Allocate polynomial with unallowed type
    206     // XXX: This is odd.
    207     {
    208         psMemId id = psMemGetId();
    209         psPolynomial3D* polyOrd = psPolynomial3DAlloc(99, TERMS-1, TERMS-1, TERMS-1);
    210         ok(polyOrd == NULL, "psPolynomial3DAlloc() returned NULL with unallowed type");
    211         //        skip_start(polyOrd == NULL, 1, "Skipping tests because psPolynomial3DAlloc() failed");
    212         //        // Attempt to evaluation invalid polynomial type
    213         //        psF64 result = psPolynomial3DEval(polyOrd,0.0, 0.0, 0.0);
    214         //        ok(isnan(result), "psPolynomial3DEval() did not return NAN, as expected");
    215         //        skip_end();
    216         psFree(polyOrd);
    217         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    218 
    219     }
    220 
    221226    // Allocate polynomial, test the psPolynomial3DEvalVector() routines
    222227    {
     
    267272        ok(!errorFlag, "psPolynomial3DEvalVector() produced the correct answers");
    268273
    269         // Attempt to invoke function with null polynomial
    270         ok(psPolynomial3DEvalVector(NULL,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL polynomial");
    271 
    272         // Attempt to invoke function with null input vector
    273         ok(psPolynomial3DEvalVector(polyOrd,NULL,inputOrdY,inputOrdZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL input vector");
    274 
    275         // Attempt to invoke function with null input vector
    276         ok(psPolynomial3DEvalVector(polyOrd,inputOrdX,NULL,inputOrdZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL input vector");
    277 
    278         // Attempt to invoke function with null input vector
    279         ok(psPolynomial3DEvalVector(polyOrd,inputOrdX,inputOrdY,NULL) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL input vector");
    280 
    281         // Attempt to invoke function with a non F64 type input vector
    282         inputOrdX->type.type = PS_TYPE_U8;
    283         ok(psPolynomial3DEvalVector(polyOrd,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with non F64 input vector");
     274
     275        // Attempt to invoke function with NULL polynomial
     276        {
     277            psMemId id = psMemGetId();
     278            ok(psPolynomial3DEvalVector(NULL,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL polynomial");
     279            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     280        }
     281
     282
     283        // Attempt to invoke function with NULL input vector
     284        {
     285            psMemId id = psMemGetId();
     286            ok(psPolynomial3DEvalVector(polyOrd,NULL,inputOrdY,inputOrdZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL input vector");
     287            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     288        }
     289   
     290
     291        // Attempt to invoke function with NULL input vector
     292        {
     293            psMemId id = psMemGetId();
     294            ok(psPolynomial3DEvalVector(polyOrd,inputOrdX,NULL,inputOrdZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL input vector");
     295            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     296        }
     297
     298
     299        // Attempt to invoke function with NULL input vector
     300        {
     301            psMemId id = psMemGetId();
     302            ok(psPolynomial3DEvalVector(polyOrd,inputOrdX,inputOrdY,NULL) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL input vector");
     303            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     304        }
     305
     306
     307        // Attempt to invoke function with a non F64 type input vector
     308        {
     309            psMemId id = psMemGetId();
     310            inputOrdX->type.type = PS_TYPE_U8;
     311            ok(psPolynomial3DEvalVector(polyOrd,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with non F64 input vector");
     312            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     313        }
    284314        inputOrdX->type.type = PS_TYPE_F64;
    285315
    286         // Attempt to invoke function with a non F64 type input vector
    287         inputOrdY->type.type = PS_TYPE_U8;
    288         ok(psPolynomial3DEvalVector(polyOrd,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with non F64 input vector");
     316
     317        // Attempt to invoke function with a non F64 type input vector
     318        {
     319            psMemId id = psMemGetId();
     320            inputOrdY->type.type = PS_TYPE_U8;
     321            ok(psPolynomial3DEvalVector(polyOrd,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with non F64 input vector");
     322            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     323        }
    289324        inputOrdY->type.type = PS_TYPE_F64;
    290325
    291326        // Attempt to invoke function with a non F64 type input vector
    292         inputOrdZ->type.type = PS_TYPE_U8;
    293         ok(psPolynomial3DEvalVector(polyOrd,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with non F64 input vector");
     327        {
     328            psMemId id = psMemGetId();
     329            inputOrdZ->type.type = PS_TYPE_U8;
     330            ok(psPolynomial3DEvalVector(polyOrd,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with non F64 input vector");
     331            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     332        }
    294333        psFree(outputOrd);
    295334        skip_end();
     
    302341
    303342
    304 
    305 
    306343    // Allocate polynomial, test the psPolynomial3DEvalVector() routines
    307344    {
     
    351388        ok(!errorFlag, "psPolynomial3DEvalVector() produced the correct answers");
    352389
    353         // Attempt to invoke function with null polynomial
    354         ok(psPolynomial3DEvalVector(NULL,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL polynomial");
    355 
    356         // Attempt to invoke function with null input vector
    357         ok(psPolynomial3DEvalVector(polyCheb,NULL,inputChebY,inputChebZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL input vector");
    358 
    359         // Attempt to invoke function with null input vector
    360         ok(psPolynomial3DEvalVector(polyCheb,inputChebX,NULL,inputChebZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL input vector");
    361 
    362         // Attempt to invoke function with null input vector
    363         ok(psPolynomial3DEvalVector(polyCheb,inputChebX,inputChebY,NULL) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL input vector");
    364 
    365         // Attempt to invoke function with a non F64 type input vector
    366         inputChebX->type.type = PS_TYPE_U8;
    367         ok(psPolynomial3DEvalVector(polyCheb,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with non F64 input vector");
     390        // Attempt to invoke function with NULL polynomial
     391        {
     392            psMemId id = psMemGetId();
     393            ok(psPolynomial3DEvalVector(NULL,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL polynomial");
     394            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     395        }
     396
     397
     398        // Attempt to invoke function with NULL input vector
     399        {
     400            psMemId id = psMemGetId();
     401            ok(psPolynomial3DEvalVector(polyCheb,NULL,inputChebY,inputChebZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL input vector");
     402            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     403        }
     404
     405
     406        // Attempt to invoke function with NULL input vector
     407        {
     408            psMemId id = psMemGetId();
     409            ok(psPolynomial3DEvalVector(polyCheb,inputChebX,NULL,inputChebZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL input vector");
     410            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     411        }
     412
     413
     414        // Attempt to invoke function with NULL input vector
     415        {
     416            psMemId id = psMemGetId();
     417            ok(psPolynomial3DEvalVector(polyCheb,inputChebX,inputChebY,NULL) == NULL, "psPolynomial3DEvalVector() produced NULL when called with NULL input vector");
     418            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     419        }
     420
     421
     422        // Attempt to invoke function with a non F64 type input vector
     423        {
     424            psMemId id = psMemGetId();
     425            inputChebX->type.type = PS_TYPE_U8;
     426            ok(psPolynomial3DEvalVector(polyCheb,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with non F64 input vector");
     427            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     428        }
    368429        inputChebX->type.type = PS_TYPE_F64;
    369430
    370         // Attempt to invoke function with a non F64 type input vector
    371         inputChebY->type.type = PS_TYPE_U8;
    372         ok(psPolynomial3DEvalVector(polyCheb,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with non F64 input vector");
     431
     432        // Attempt to invoke function with a non F64 type input vector
     433        {
     434            psMemId id = psMemGetId();
     435            inputChebY->type.type = PS_TYPE_U8;
     436            ok(psPolynomial3DEvalVector(polyCheb,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with non F64 input vector");
     437            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     438        }
    373439        inputChebY->type.type = PS_TYPE_F64;
    374440
    375         // Attempt to invoke function with a non F64 type input vector
    376         inputChebZ->type.type = PS_TYPE_U8;
    377         ok(psPolynomial3DEvalVector(polyCheb,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with non F64 input vector");
     441
     442        // Attempt to invoke function with a non F64 type input vector
     443        {
     444            psMemId id = psMemGetId();
     445            inputChebZ->type.type = PS_TYPE_U8;
     446            ok(psPolynomial3DEvalVector(polyCheb,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial3DEvalVector() produced NULL when called with non F64 input vector");
     447            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     448        }
    378449        psFree(outputCheb);
    379450        skip_end();
  • trunk/psLib/test/math/tap_psPolynomialEval4D.c

    r11422 r13124  
    44*  ORD and CHEB type polynomials.
    55*
    6 *  @version  $Revision: 1.4 $  $Name: not supported by cvs2svn $
    7 *  @date  $Date: 2007-01-30 04:49:52 $
     6*  @version  $Revision: 1.5 $  $Name: not supported by cvs2svn $
     7*  @date  $Date: 2007-05-02 04:20:06 $
    88*
    99* Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    363363    psLogSetFormat("HLNM");
    364364    psLogSetLevel(PS_LOG_INFO);
    365     plan_tests(37);
     365    plan_tests(56);
     366
     367
     368    // Allocate polynomial with unallowed type
     369    {
     370        psMemId id = psMemGetId();
     371        psPolynomial4D* polyOrd = psPolynomial4DAlloc(99, TERMS-1, TERMS-1, TERMS-1, TERMS-1);
     372        ok(polyOrd == NULL, "psPolynomial4DAlloc() returned NULL with unallowed type");
     373        psFree(polyOrd);
     374        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     375    }
     376
     377
     378    // Evaluate NULL polynomial
     379    {
     380        psMemId id = psMemGetId();
     381        psF64 result = psPolynomial4DEval(NULL, 0.0, 0.0, 0.0, 0.0);
     382        ok(isnan(result), "psPolynomial4DEval() returned NAN with unallowed type");
     383        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     384    }
     385
    366386
    367387    // Allocate and evaluate an ordinary polynomial structure
     
    444464
    445465
    446     // XXX: This is wierd: why the skip()?
    447     // Allocate polynomial with unallowed type
    448     {
    449         psMemId id = psMemGetId();
    450         psPolynomial4D* polyOrd = psPolynomial4DAlloc(99, TERMS-1, TERMS-1, TERMS-1, TERMS-1);
    451         ok(polyOrd == NULL, "Ordinary polynomial allocation successful");
    452         skip_start(polyOrd == NULL, 1, "Skipping tests because psPolynomial4DAlloc() failed");
    453 
    454         // Attempt to evaluation invalid polynomial type
    455         psF64 result = psPolynomial4DEval(polyOrd,0.0, 0.0, 0.0, 0.0);
    456         ok(isnan(result), "psPolynomial3DEval() did not return NAN, as expected");
    457         skip_end();
    458         psFree(polyOrd);
    459         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    460     }
    461 
    462466    // Allocate polynomial, test the psPolynomial4DEvalVector() routines
    463467    {
     
    514518        ok(!errorFlag, "psPolynomial4DEvalVector() produced the correct answers");
    515519
    516         // Attempt to invoke function with null polynomial
    517         ok(psPolynomial4DEvalVector(NULL,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL polynomial");
    518 
    519         // Attempt to invoke function with null input vector
    520         ok(psPolynomial4DEvalVector(polyOrd,NULL,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
    521 
    522         // Attempt to invoke function with null input vector
    523         ok(psPolynomial4DEvalVector(polyOrd,inputOrdW,NULL,inputOrdY,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
    524 
    525         // Attempt to invoke function with null input vector
    526         ok(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,NULL,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
    527 
    528         // Attempt to invoke function with null input vector
    529         ok(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,NULL) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
     520
     521        // Attempt to invoke function with NULL polynomial
     522        {
     523            psMemId id = psMemGetId();
     524            ok(psPolynomial4DEvalVector(NULL,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL polynomial");
     525            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     526        }
     527
     528
     529        // Attempt to invoke function with NULL input vector
     530        {
     531            psMemId id = psMemGetId();
     532            ok(psPolynomial4DEvalVector(polyOrd,NULL,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
     533            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     534        }
     535
     536
     537        // Attempt to invoke function with NULL input vector
     538        {
     539            psMemId id = psMemGetId();
     540            ok(psPolynomial4DEvalVector(polyOrd,inputOrdW,NULL,inputOrdY,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
     541            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     542        }
     543
     544
     545        // Attempt to invoke function with NULL input vector
     546        {
     547            psMemId id = psMemGetId();
     548            ok(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,NULL,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
     549            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     550        }
     551
     552
     553        // Attempt to invoke function with NULL input vector
     554        {
     555            psMemId id = psMemGetId();
     556            ok(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,NULL) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
     557            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     558        }
     559
    530560
    531561        // Attempt to invoke function with a non F64 type input vector
    532         inputOrdX->type.type = PS_TYPE_U8;
    533         ok(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     562        {
     563            psMemId id = psMemGetId();
     564            inputOrdX->type.type = PS_TYPE_U8;
     565            ok(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     566            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     567        }
    534568        inputOrdX->type.type = PS_TYPE_F64;
    535569
     570
    536571        // Attempt to invoke function with a non F64 type input vector
    537         inputOrdY->type.type = PS_TYPE_U8;
    538         ok(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     572        {
     573            psMemId id = psMemGetId();
     574            inputOrdY->type.type = PS_TYPE_U8;
     575            ok(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     576            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     577        }
    539578        inputOrdY->type.type = PS_TYPE_F64;
    540579
     580
    541581        // Attempt to invoke function with a non F64 type input vector
    542         inputOrdZ->type.type = PS_TYPE_U8;
    543         ok(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     582        {
     583            psMemId id = psMemGetId();
     584            inputOrdZ->type.type = PS_TYPE_U8;
     585            ok(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     586            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     587        }
    544588        inputOrdZ->type.type = PS_TYPE_F64;
    545589
     590
    546591        // Attempt to invoke function with a non F64 type input vector
    547         inputOrdW->type.type = PS_TYPE_U8;
    548         ok(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     592        {
     593            psMemId id = psMemGetId();
     594            inputOrdW->type.type = PS_TYPE_U8;
     595            ok(psPolynomial4DEvalVector(polyOrd,inputOrdW,inputOrdX,inputOrdY,inputOrdZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     596            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     597        }
    549598        inputOrdW->type.type = PS_TYPE_F64;
    550599        psFree(outputOrd);
     
    613662        ok(!errorFlag, "psPolynomial4DEvalVector() produced the correct answers");
    614663
    615         // Attempt to invoke function with null polynomial
    616         ok(psPolynomial4DEvalVector(NULL,inputChebW,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL polynomial");
    617 
    618         // Attempt to invoke function with null input vector
    619         ok(psPolynomial4DEvalVector(polyCheb,NULL,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
    620 
    621         // Attempt to invoke function with null input vector
    622         ok(psPolynomial4DEvalVector(polyCheb,inputChebW,NULL,inputChebY,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
    623 
    624         // Attempt to invoke function with null input vector
    625         ok(psPolynomial4DEvalVector(polyCheb,inputChebW,inputChebX,NULL,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
    626 
    627         // Attempt to invoke function with null input vector
    628         ok(psPolynomial4DEvalVector(polyCheb,inputChebW,inputChebX,inputChebY,NULL) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
     664
     665        // Attempt to invoke function with NULL polynomial
     666        {
     667            psMemId id = psMemGetId();
     668            ok(psPolynomial4DEvalVector(NULL,inputChebW,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL polynomial");
     669            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     670        }
     671
     672
     673        // Attempt to invoke function with NULL input vector
     674        {
     675            psMemId id = psMemGetId();
     676            ok(psPolynomial4DEvalVector(polyCheb,NULL,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
     677            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     678        }
     679
     680
     681        // Attempt to invoke function with NULL input vector
     682        {
     683            psMemId id = psMemGetId();
     684            ok(psPolynomial4DEvalVector(polyCheb,inputChebW,NULL,inputChebY,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
     685            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     686        }
     687
     688
     689        // Attempt to invoke function with NULL input vector
     690        {
     691            psMemId id = psMemGetId();
     692            ok(psPolynomial4DEvalVector(polyCheb,inputChebW,inputChebX,NULL,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
     693            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     694        }
     695
     696
     697        // Attempt to invoke function with NULL input vector
     698        {
     699            psMemId id = psMemGetId();
     700            ok(psPolynomial4DEvalVector(polyCheb,inputChebW,inputChebX,inputChebY,NULL) == NULL, "psPolynomial4DEvalVector() produced NULL when called with NULL input vector");
     701            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     702        }
     703
    629704
    630705        // Attempt to invoke function with a non F64 type input vector
    631         inputChebX->type.type = PS_TYPE_U8;
    632         ok(psPolynomial4DEvalVector(polyCheb,inputChebW,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     706        {
     707            psMemId id = psMemGetId();
     708            inputChebX->type.type = PS_TYPE_U8;
     709            ok(psPolynomial4DEvalVector(polyCheb,inputChebW,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     710            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     711        }
    633712        inputChebX->type.type = PS_TYPE_F64;
    634713
     714
    635715        // Attempt to invoke function with a non F64 type input vector
    636         inputChebY->type.type = PS_TYPE_U8;
    637         ok(psPolynomial4DEvalVector(polyCheb,inputChebW,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     716        {
     717            psMemId id = psMemGetId();
     718            inputChebY->type.type = PS_TYPE_U8;
     719            ok(psPolynomial4DEvalVector(polyCheb,inputChebW,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     720            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     721        }
    638722        inputChebY->type.type = PS_TYPE_F64;
    639723
     724
    640725        // Attempt to invoke function with a non F64 type input vector
    641         inputChebZ->type.type = PS_TYPE_U8;
    642         ok(psPolynomial4DEvalVector(polyCheb,inputChebW,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     726        {
     727            psMemId id = psMemGetId();
     728            inputChebZ->type.type = PS_TYPE_U8;
     729            ok(psPolynomial4DEvalVector(polyCheb,inputChebW,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     730            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     731        }
    643732        inputChebZ->type.type = PS_TYPE_F64;
    644733
     734
    645735        // Attempt to invoke function with a non F64 type input vector
    646         inputChebW->type.type = PS_TYPE_U8;
    647         ok(psPolynomial4DEvalVector(polyCheb,inputChebW,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     736        {
     737            psMemId id = psMemGetId();
     738            inputChebW->type.type = PS_TYPE_U8;
     739            ok(psPolynomial4DEvalVector(polyCheb,inputChebW,inputChebX,inputChebY,inputChebZ) == NULL, "psPolynomial4DEvalVector() produced NULL when called with non F64 input vector");
     740            ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     741        }
    648742        inputChebW->type.type = PS_TYPE_F64;
    649743        psFree(outputCheb);
  • trunk/psLib/test/math/tap_psSparse.c

    r13123 r13124  
    1 #include <stdio.h>
     1    #include <stdio.h>
    22#include <string.h>
    33#include <pslib.h>
     
    66#include "pstap.h"
    77
    8 int main (void)
     8int main(void)
    99{
    10     plan_tests(26);
     10    psLogSetFormat("HLNM");
     11    psLogSetLevel(PS_LOG_INFO);
     12    plan_tests(40);
     13
     14
     15    // test psSparseAlloc()
     16    {
     17        psMemId id = psMemGetId();
     18        psSparse *matrix = psSparseAlloc(10, 20);
     19        ok(matrix != NULL, "psSparse successfully allocated");
     20        skip_start(matrix == NULL, 12, "skipping tests because psSparseAlloc() returned NULL");
     21        ok(matrix->Aij != NULL, "psSparseAlloc() set ->Aij correctly");
     22        ok(matrix->Aij->n == 0, "psSparseAlloc() set ->Aij->n correctly");
     23        ok(matrix->Si != NULL, "psSparseAlloc() set ->Si correctly");
     24        ok(matrix->Si->n == 0, "psSparseAlloc() set ->Si->n correctly");
     25        ok(matrix->Sj != NULL, "psSparseAlloc() set ->Sj correctly");
     26        ok(matrix->Sj->n == 0, "psSparseAlloc() set ->Sj->n correctly");
     27        ok(matrix->Bfj != NULL, "psSparseAlloc() set ->Bfj correctly");
     28        ok(matrix->Bfj->n == 10, "psSparseAlloc() set ->Bfj->n correctly");
     29        ok(matrix->Qii != NULL, "psSparseAlloc() set ->Qii correctly");
     30        ok(matrix->Qii->n == 10, "psSparseAlloc() set ->Qii->n correctly");
     31        ok(matrix->Nelem == 0, "psSparseAlloc() set ->Nelem correctly");
     32        ok(matrix->Nrows == 10, "psSparseAlloc() set ->Nrows correctly");
     33        skip_end();
     34        psFree(matrix);
     35        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
     36    }
     37
    1138
    1239    // test psSparseSolve for a simple normal example matrix
    1340    {
    1441        psMemId id = psMemGetId();
    15 
    16         //solve a normalized matrix equation with psSparseSolve
    17 
    1842        // the basic equation is Ax = b
    1943
     
    2246        // Ax = b for x using psSparseSolve.  compare with the input values for x.
    2347
    24         psSparse *matrix = psSparseAlloc (100, 100);
     48        psSparse *matrix = psSparseAlloc(100, 100);
    2549        ok(matrix != NULL, "psSparse successfully allocated");
    2650        skip_start(matrix == NULL, 5, "Skipping tests because psSparseAlloc() failed");
    2751
    28         for (int i = 0; i < 100; i++) {
    29             psSparseMatrixElement (matrix, i, i, 1.0);
     52        for(int i = 0; i < 100; i++) {
     53            psSparseMatrixElement(matrix, i, i, 1.0);
    3054            if (i + 1 < 100) {
    31                 psSparseMatrixElement (matrix, i + 1, i, 0.1);
     55                psSparseMatrixElement(matrix, i + 1, i, 0.1);
    3256            }
    3357        }
     
    3761        psSparseResort(matrix);
    3862
    39         psVector *xRef = psVectorAlloc (100, PS_TYPE_F32);
    40         for (int i = 0; i < 100; i++)
    41         {
     63        psVector *xRef = psVectorAlloc(100, PS_TYPE_F32);
     64        for (int i = 0; i < 100; i++) {
    4265            xRef->data.F32[i] = 1.0;
    4366        }
     
    6083        float dS = 0;
    6184        float dS2 = 0;
    62         for (int i = 0; i < 100; i++)
    63         {
     85        for (int i = 0; i < 100; i++) {
    6486            float dX = xRef->data.F32[i] - xFit->data.F32[i];
    65             // fprintf (stderr, "%5.3f %5.3f %5.3f %5.3f\n", bVec->data.F32[i], xRef->data.F32[i], xFit->data.F32[i], dX);
     87            // fprintf(stderr, "%5.3f %5.3f %5.3f %5.3f\n", bVec->data.F32[i], xRef->data.F32[i], xFit->data.F32[i], dX);
    6688            dS2 += PS_SQR(dX);
    6789            dS += dX;
    6890        }
    6991        dS /= 100.0;
    70         dS2 = sqrt (dS2/100.0 - dS*dS);
    71 
    72         is_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
    73 
    74         psFree (matrix);
    75         psFree (xRef);
    76         psFree (bVec);
    77         psFree (xFit);
    78 
    79         skip_end();
    80         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     92        dS2 = sqrt(dS2/100.0 - dS*dS);
     93
     94        is_float_tol(dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
     95
     96        psFree(matrix);
     97        psFree(xRef);
     98        psFree(bVec);
     99        psFree(xFit);
     100
     101        skip_end();
     102        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    81103    }
    82104
     
    84106    {
    85107        psMemId id = psMemGetId();
    86 
    87         //solve a non-normalized matrix equation with psSparseSolve
    88108        // the basic equation is Ax = b
     109
    89110        // create a matrix A with diagonals of 1 and a small number of off diagonal elements.
    90111        // construct a vector x, construct the corresponding vector b by multiplication. solve
    91112        // Ax = b for x using psSparseSolve.  compare with the input values for x.
    92113
    93         psSparse *matrix = psSparseAlloc (100, 100);
     114        psSparse *matrix = psSparseAlloc(100, 100);
    94115        ok(matrix != NULL, "psSparse successfully allocated");
    95116        skip_start(matrix == NULL, 5, "Skipping tests because psSparseAlloc() failed");
    96117
    97118        for (int i = 0; i < 100; i++) {
    98             psSparseMatrixElement (matrix, i, i, 5.0);
     119            psSparseMatrixElement(matrix, i, i, 5.0);
    99120            if (i + 1 < 100) {
    100                 psSparseMatrixElement (matrix, i + 1, i, 0.1);
     121                psSparseMatrixElement(matrix, i + 1, i, 0.1);
    101122            }
    102123        }
     
    106127        psSparseResort(matrix);
    107128
    108         psVector *xRef = psVectorAlloc (100, PS_TYPE_F32);
    109         for (int i = 0; i < 100; i++)
    110         {
     129        psVector *xRef = psVectorAlloc(100, PS_TYPE_F32);
     130        for (int i = 0; i < 100; i++) {
    111131            xRef->data.F32[i] = 1.0;
    112132        }
     
    123143        constraint.paramDelta = 1e8;
    124144
    125         // solve for normalization terms (need include local sky?)
     145        // solve for normalization terms(need include local sky?)
    126146        psVector *xFit = psSparseSolve(NULL, constraint, matrix, 4);
    127147
     
    129149        float dS = 0;
    130150        float dS2 = 0;
    131         for (int i = 0; i < 100; i++)
    132         {
     151        for (int i = 0; i < 100; i++) {
    133152            float dX = xRef->data.F32[i] - xFit->data.F32[i];
    134             // fprintf (stderr, "%5.3f %5.3f %5.3f %5.3f\n", bVec->data.F32[i], xRef->data.F32[i], xFit->data.F32[i], dX);
     153            // fprintf(stderr, "%5.3f %5.3f %5.3f %5.3f\n", bVec->data.F32[i], xRef->data.F32[i], xFit->data.F32[i], dX);
    135154            dS2 += PS_SQR(dX);
    136155            dS += dX;
    137156        }
    138157        dS /= 100.0;
    139         dS2 = sqrt (dS2/100.0 - dS*dS);
    140 
    141         is_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
    142 
    143         psFree (matrix);
    144         psFree (xRef);
    145         psFree (bVec);
    146         psFree (xFit);
    147 
    148         skip_end();
    149         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     158        dS2 = sqrt(dS2/100.0 - dS*dS);
     159
     160        is_float_tol(dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
     161
     162        psFree(matrix);
     163        psFree(xRef);
     164        psFree(bVec);
     165        psFree(xFit);
     166
     167        skip_end();
     168        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    150169    }
    151170
     
    164183    {
    165184        psMemId id = psMemGetId();
    166 
    167         //solve a simple, small matrix equation
    168 
    169         // the basic equation (Ax = b) is:
     185        // the basic equation(Ax = b) is:
    170186        // |S B'||x| = |f|
    171187        // |B Q ||y| = |g|
     
    180196
    181197        // construct the sparse matrix
    182         psSparse *matrix = psSparseAlloc (Nrows, Nrows);
     198        psSparse *matrix = psSparseAlloc(Nrows, Nrows);
    183199        ok(matrix != NULL, "psSparse successfully allocated");
    184200        skip_start(matrix == NULL, 5, "Skipping tests because psSparseAlloc() failed");
     
    190206
    191207        // border region has a width of 1:
    192         psSparseBorder *border = psSparseBorderAlloc (matrix, Nborder);
     208        psSparseBorder *border = psSparseBorderAlloc(matrix, Nborder);
    193209
    194210        // construct the B component:
    195         psSparseBorderElementB (border, 0, 0, 0.1);
    196         psSparseBorderElementB (border, 1, 0, 0.2);
     211        psSparseBorderElementB(border, 0, 0, 0.1);
     212        psSparseBorderElementB(border, 1, 0, 0.2);
    197213
    198214        // construct the T component:
    199         psSparseBorderElementT (border, 0, 0, 0.5);
     215        psSparseBorderElementT(border, 0, 0, 0.5);
    200216
    201217        // construct the X and Y vectors:
    202         psVector *xRef = psVectorAlloc (Nrows, PS_TYPE_F32);
     218        psVector *xRef = psVectorAlloc(Nrows, PS_TYPE_F32);
    203219        xRef->data.F32[0] = 1.0;
    204220        xRef->data.F32[1] = 1.0;
    205         psVector *yRef = psVectorAlloc (Nborder, PS_TYPE_F32);
     221        psVector *yRef = psVectorAlloc(Nborder, PS_TYPE_F32);
    206222        yRef->data.F32[0] = 0.5;
    207223
     
    210226
    211227        // test the support functions: LowerProduct
    212         fVec = psSparseBorderLowerProduct (NULL, border, xRef);
    213         is_float (fVec->n, 1.0, "f dimen: %d", fVec->n);
    214         is_float (fVec->data.F32[0], 0.3, "f(0): %f", fVec->data.F32[0]);
    215         psFree (fVec);
     228        fVec = psSparseBorderLowerProduct(NULL, border, xRef);
     229        is_float(fVec->n, 1.0, "f dimen: %d", fVec->n);
     230        is_float(fVec->data.F32[0], 0.3, "f(0): %f", fVec->data.F32[0]);
     231        psFree(fVec);
    216232
    217233        // test the support functions: Upper Product
    218         fVec = psSparseBorderUpperProduct (NULL, border, yRef);
    219         is_float (fVec->n, 2.0, "f dimen: %d", fVec->n);
    220         is_float (fVec->data.F32[0], 0.05, "f(0): %f", fVec->data.F32[0]);
    221         is_float (fVec->data.F32[1], 0.10, "f(0): %f", fVec->data.F32[1]);
    222         psFree (fVec);
     234        fVec = psSparseBorderUpperProduct(NULL, border, yRef);
     235        is_float(fVec->n, 2.0, "f dimen: %d", fVec->n);
     236        is_float(fVec->data.F32[0], 0.05, "f(0): %f", fVec->data.F32[0]);
     237        is_float(fVec->data.F32[1], 0.10, "f(0): %f", fVec->data.F32[1]);
     238        psFree(fVec);
    223239
    224240        // test the support functions: Square Product
    225         fVec = psSparseBorderSquareProduct (NULL, border, yRef);
    226         is_float (fVec->n, 1.0, "f dimen: %d", fVec->n);
    227         is_float (fVec->data.F32[0], 0.25, "f(0): %f", fVec->data.F32[0]);
    228         psFree (fVec);
     241        fVec = psSparseBorderSquareProduct(NULL, border, yRef);
     242        is_float(fVec->n, 1.0, "f dimen: %d", fVec->n);
     243        is_float(fVec->data.F32[0], 0.25, "f(0): %f", fVec->data.F32[0]);
     244        psFree(fVec);
    229245
    230246        fVec = NULL;
    231247        psVector *gVec = NULL;
    232         psSparseBorderMultiply (&fVec, &gVec, border, xRef, yRef);
    233         is_float (fVec->data.F32[0], 1.15, "f(0): %f", fVec->data.F32[0]);
    234         is_float (fVec->data.F32[1], 1.20, "f(1): %f", fVec->data.F32[1]);
    235         is_float (gVec->data.F32[0], 0.55, "g(0): %f", gVec->data.F32[0]);
     248        psSparseBorderMultiply(&fVec, &gVec, border, xRef, yRef);
     249        is_float(fVec->data.F32[0], 1.15, "f(0): %f", fVec->data.F32[0]);
     250        is_float(fVec->data.F32[1], 1.20, "f(1): %f", fVec->data.F32[1]);
     251        is_float(gVec->data.F32[0], 0.55, "g(0): %f", gVec->data.F32[0]);
    236252
    237253        // supply the fVec and gVec data to the border
     
    253269        psVector *yFit = NULL;
    254270        psSparseBorderSolve(&xFit, &yFit, constraint, border, 4);
    255         is_float_tol (xFit->data.F32[0], 1.0, 1e-4, "f(0): %f", xFit->data.F32[0]);
    256         is_float_tol (xFit->data.F32[1], 1.0, 1e-4, "f(1): %f", xFit->data.F32[1]);
    257         is_float_tol (yFit->data.F32[0], 0.5, 1e-4, "g(0): %f", yFit->data.F32[0]);
    258 
    259         psFree (xFit);
    260         psFree (yFit);
    261         psFree (fVec);
    262         psFree (gVec);
    263         psFree (xRef);
    264         psFree (yRef);
    265         psFree (border);
    266         psFree (matrix);
    267         skip_end();
    268         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     271        is_float_tol(xFit->data.F32[0], 1.0, 1e-4, "f(0): %f", xFit->data.F32[0]);
     272        is_float_tol(xFit->data.F32[1], 1.0, 1e-4, "f(1): %f", xFit->data.F32[1]);
     273        is_float_tol(yFit->data.F32[0], 0.5, 1e-4, "g(0): %f", yFit->data.F32[0]);
     274
     275        psFree(xFit);
     276        psFree(yFit);
     277        psFree(fVec);
     278        psFree(gVec);
     279        psFree(xRef);
     280        psFree(yRef);
     281        psFree(border);
     282        psFree(matrix);
     283        skip_end();
     284        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    269285    }
    270286
     
    272288    {
    273289        psMemId id = psMemGetId();
    274 
    275         // solve a simple, small matrix equation
    276 
    277         // the basic equation (Ax = b) is:
     290        // the basic equation(Ax = b) is:
    278291        // |S B'||x| = |f|
    279292        // |B Q ||y| = |g|
     
    288301
    289302        // construct the sparse matrix
    290         psSparse *matrix = psSparseAlloc (Nrows, Nrows);
     303        psSparse *matrix = psSparseAlloc(Nrows, Nrows);
    291304        ok(matrix != NULL, "psSparse successfully allocated");
    292305        skip_start(matrix == NULL, 5, "Skipping tests because psSparseAlloc() failed");
     
    301314
    302315        // border region has a width of 1:
    303         psSparseBorder *border = psSparseBorderAlloc (matrix, Nborder);
     316        psSparseBorder *border = psSparseBorderAlloc(matrix, Nborder);
    304317
    305318        // construct the B component:
    306         for (int i = 0; i < Nrows; i++)
    307         {
     319        for (int i = 0; i < Nrows; i++) {
    308320            for (int j = 0; j < Nborder; j++) {
    309                 psSparseBorderElementB (border, i, j, 0.1);
     321                psSparseBorderElementB(border, i, j, 0.1);
    310322            }
    311323        }
     
    313325
    314326        // construct the Q component:
    315         for (int i = 0; i < Nborder; i++)
    316         {
     327        for (int i = 0; i < Nborder; i++) {
    317328            for (int j = 0; j < Nborder; j++) {
    318                 psSparseBorderElementT (border, i, j, i+j+2);
     329                psSparseBorderElementT(border, i, j, i+j+2);
    319330            }
    320331        }
    321332
    322333        // construct the X and Y vectors:
    323         psVector *xRef = psVectorAlloc (Nrows, PS_TYPE_F32);
    324         for (int i = 0; i < Nrows; i++)
    325         {
     334        psVector *xRef = psVectorAlloc(Nrows, PS_TYPE_F32);
     335        for (int i = 0; i < Nrows; i++) {
    326336            xRef->data.F32[i] = 1.0;
    327337        }
    328         psVector *yRef = psVectorAlloc (Nborder, PS_TYPE_F32);
    329         for (int i = 0; i < Nborder; i++)
    330         {
     338        psVector *yRef = psVectorAlloc(Nborder, PS_TYPE_F32);
     339        for (int i = 0; i < Nborder; i++) {
    331340            yRef->data.F32[i] = 1.0;
    332341        }
     
    335344        psVector *fVec = NULL;
    336345        psVector *gVec = NULL;
    337         psSparseBorderMultiply (&fVec, &gVec, border, xRef, yRef);
     346        psSparseBorderMultiply(&fVec, &gVec, border, xRef, yRef);
    338347
    339348        // supply the fVec and gVec data to the border
     
    351360        constraint.paramDelta = 1e8;
    352361
    353         // solve for normalization terms (need include local sky?)
     362        // solve for normalization terms(need include local sky?)
    354363        psVector *xFit = NULL;
    355364        psVector *yFit = NULL;
     
    359368        float dS = 0;
    360369        float dS2 = 0;
    361         for (int i = 0; i < Nrows; i++)
    362         {
     370        for (int i = 0; i < Nrows; i++) {
    363371            float dX = xRef->data.F32[i] - xFit->data.F32[i];
    364             // fprintf (stderr, "%5.3f %5.3f %5.3f %5.3f\n", fVec->data.F32[i], xRef->data.F32[i], xFit->data.F32[i], dX);
     372            // fprintf(stderr, "%5.3f %5.3f %5.3f %5.3f\n", fVec->data.F32[i], xRef->data.F32[i], xFit->data.F32[i], dX);
    365373            dS2 += PS_SQR(dX);
    366374            dS += dX;
    367375        }
    368376        dS /= Nrows;
    369         dS2 = sqrt (dS2/Nrows - dS*dS);
    370         is_float_tol (dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
     377        dS2 = sqrt(dS2/Nrows - dS*dS);
     378        is_float_tol(dS2, 0.0, 1e-4, "scatter: %.20f", dS2);
    371379
    372380        // measure stdev between yFit and yRef
    373381        float dY = yRef->data.F32[0] - yFit->data.F32[0];
    374         // fprintf (stderr, "%5.3f %5.3f %5.3f %5.3f\n", gVec->data.F32[0], yRef->data.F32[0], yFit->data.F32[0], dS);
    375         is_float_tol (dY, 0.0, 2e-4, "scatter: %.20f", dY);
    376 
    377         psFree (xRef);
    378         psFree (yRef);
    379         psFree (xFit);
    380         psFree (yFit);
    381         psFree (fVec);
    382         psFree (gVec);
    383         psFree (matrix);
    384         psFree (border);
    385 
    386         skip_end();
    387         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    388     }
    389 
    390     return exit_status();
     382        // fprintf(stderr, "%5.3f %5.3f %5.3f %5.3f\n", gVec->data.F32[0], yRef->data.F32[0], yFit->data.F32[0], dS);
     383        is_float_tol(dY, 0.0, 2e-4, "scatter: %.20f", dY);
     384
     385        psFree(xRef);
     386        psFree(yRef);
     387        psFree(xFit);
     388        psFree(yFit);
     389        psFree(fVec);
     390        psFree(gVec);
     391        psFree(matrix);
     392        psFree(border);
     393
     394        skip_end();
     395        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
     396    }
    391397}
  • trunk/psLib/test/math/tap_psSpline1D.c

    r10945 r13124  
    1313*  @author GLG, MHPCC
    1414*
    15 *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    16 *  @date $Date: 2007-01-06 00:48:54 $
     15*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     16*  @date $Date: 2007-05-02 04:20:06 $
    1717*
    1818*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    257257    psLogSetFormat("HLNM");
    258258    psLogSetLevel( PS_LOG_INFO );
    259 
    260     plan_tests(24);
     259    plan_tests(28);
     260
    261261    // psSplineAllocTest()
    262262    {
     
    270270        ok(tmpSpline->p_psDeriv2 == NULL, "psSpline1DAlloc() properly set the psSpline1D->p_psDeriv2 member");
    271271        psFree(tmpSpline);
    272 
    273272        skip_end();
    274273        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     
    282281        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    283282    }
     283
     284    // Verify psSpline1DEval() for NULL input
     285    // Verify with spline->n==0, and spline->knots PS_TYPE_F64
     286    {
     287        psMemId id = psMemGetId();
     288        float y = psSpline1DEval(NULL, 0.0);
     289        ok(isnan(y), "psSpline1DEval() returned NAN will NULL input spline");
     290        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     291    }
     292
     293
     294    // Verify psSpline1DEvalVector() for NULL input spline
     295    {
     296        psMemId id = psMemGetId();
     297        psVector *x = psVectorAlloc(10, PS_TYPE_F32);
     298        psVector *y = psSpline1DEvalVector(NULL, x);
     299        ok(y == NULL, "psSpline1DEvalVector() returned NAN will NULL input spline");
     300        psFree(x);
     301        psFree(y);
     302        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     303    }
     304
     305
     306    // Verify psSpline1DEvalVector() for NULL input vector
     307    // XXX: Move this where we have a good spline.  It currently fails because
     308    // were calling it with an un-fully-allocated one.
     309    if (0) {
     310        psMemId id = psMemGetId();
     311        psSpline1D *tmpSpline = psSpline1DAlloc();
     312        psVector *y = psSpline1DEvalVector(tmpSpline, NULL);
     313        ok(y == NULL, "psSpline1DEvalVector() returned NAN will NULL input vector");
     314        psFree(tmpSpline);
     315        psFree(y);
     316        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     317    }
     318
    284319
    285320    ok(genericF32Test(1, myFunc00, false), "Generic, simple mapping, F32 test. 1 spline");
Note: See TracChangeset for help on using the changeset viewer.