IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13307


Ignore:
Timestamp:
May 7, 2007, 8:35:16 PM (19 years ago)
Author:
gusciora
Message:

Moved the unallowed polynomial type test here.

File:
1 edited

Legend:

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

    r13305 r13307  
    1616*    XXX: Compare to FLT_EPSILON
    1717*
    18 *    @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    19 *    @date $Date: 2007-05-08 06:21:16 $
     18*    @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
     19*    @date $Date: 2007-05-08 06:35:16 $
    2020*
    2121*  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    3535    psLogSetFormat("HLNM");
    3636    psLogSetLevel(PS_LOG_INFO);
    37     plan_tests(51);
     37    plan_tests(59);
    3838
    3939    // This test will allocate a 1D polynomial and verify the structure allocated
     
    9898
    9999
     100    // Allocate polynomial with unallowable type
     101    {
     102        psMemId id = psMemGetId();
     103        psPolynomial1D* polyOrd = psPolynomial1DAlloc(99, ORDER);
     104        ok(polyOrd==NULL, "psPolynomial1DAlloc() returned NULL with unallowed type");
     105        psFree(polyOrd);
     106        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     107    }
     108
     109
    100110    // This test will allocate a 2D polynomial and verify the structure allocated
    101111    {
     
    159169        ok(psPolynomial2DAlloc(PS_POLYNOMIAL_ORD, 1, -1) == NULL,
    160170          "psPolynomial2DAlloc() returned NULL with negative polynomial order");
     171        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     172    }
     173
     174
     175    // Allocate polynomial with unallowed type
     176    {
     177        psMemId id = psMemGetId();
     178        psPolynomial2D* polyOrd = psPolynomial2DAlloc(99, ORDER, ORDER);
     179        ok(polyOrd == NULL, "psPolynomial2DAlloc() returned NULL with unallowed tpye");
     180        psFree(polyOrd);
    161181        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    162182    }
     
    234254          "psPolynomial3DAlloc() returned NULL with negative polynomial order");
    235255        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     256    }
     257
     258
     259    // Allocate polynomial with unallowed type
     260    {
     261        psMemId id = psMemGetId();
     262        psPolynomial3D* polyOrd = psPolynomial3DAlloc(99, ORDER, ORDER, ORDER);
     263        ok(polyOrd == NULL, "psPolynomial3DAlloc() returned NULL with unallowed type");
     264        psFree(polyOrd);
     265        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     266
    236267    }
    237268
     
    316347
    317348
     349    // Allocate polynomial with unallowed type
     350    {
     351        psMemId id = psMemGetId();
     352        psPolynomial4D* polyOrd = psPolynomial4DAlloc(99, ORDER, ORDER, ORDER, ORDER);
     353        ok(polyOrd == NULL, "psPolynomial4DAlloc() returned NULL with unallowed type");
     354        psFree(polyOrd);
     355        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     356    }
    318357}
    319358
Note: See TracChangeset for help on using the changeset viewer.