Index: trunk/psLib/test/math/tap_psPolynomial.c
===================================================================
--- trunk/psLib/test/math/tap_psPolynomial.c	(revision 13305)
+++ trunk/psLib/test/math/tap_psPolynomial.c	(revision 13307)
@@ -16,6 +16,6 @@
 *    XXX: Compare to FLT_EPSILON
 * 
-*    @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
-*    @date $Date: 2007-05-08 06:21:16 $
+*    @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
+*    @date $Date: 2007-05-08 06:35:16 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
@@ -35,5 +35,5 @@
     psLogSetFormat("HLNM");
     psLogSetLevel(PS_LOG_INFO);
-    plan_tests(51);
+    plan_tests(59);
 
     // This test will allocate a 1D polynomial and verify the structure allocated
@@ -98,4 +98,14 @@
 
 
+    // Allocate polynomial with unallowable type
+    {
+        psMemId id = psMemGetId();
+        psPolynomial1D* polyOrd = psPolynomial1DAlloc(99, ORDER);
+        ok(polyOrd==NULL, "psPolynomial1DAlloc() returned NULL with unallowed type");
+        psFree(polyOrd);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
+
+
     // This test will allocate a 2D polynomial and verify the structure allocated
     {
@@ -159,4 +169,14 @@
         ok(psPolynomial2DAlloc(PS_POLYNOMIAL_ORD, 1, -1) == NULL,
           "psPolynomial2DAlloc() returned NULL with negative polynomial order");
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
+
+
+    // Allocate polynomial with unallowed type
+    {
+        psMemId id = psMemGetId();
+        psPolynomial2D* polyOrd = psPolynomial2DAlloc(99, ORDER, ORDER);
+        ok(polyOrd == NULL, "psPolynomial2DAlloc() returned NULL with unallowed tpye");
+        psFree(polyOrd);
         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     }
@@ -234,4 +254,15 @@
           "psPolynomial3DAlloc() returned NULL with negative polynomial order");
         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
+
+
+    // Allocate polynomial with unallowed type
+    {
+        psMemId id = psMemGetId();
+        psPolynomial3D* polyOrd = psPolynomial3DAlloc(99, ORDER, ORDER, ORDER);
+        ok(polyOrd == NULL, "psPolynomial3DAlloc() returned NULL with unallowed type");
+        psFree(polyOrd);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+
     }
 
@@ -316,4 +347,12 @@
 
 
+    // Allocate polynomial with unallowed type
+    {
+        psMemId id = psMemGetId();
+        psPolynomial4D* polyOrd = psPolynomial4DAlloc(99, ORDER, ORDER, ORDER, ORDER);
+        ok(polyOrd == NULL, "psPolynomial4DAlloc() returned NULL with unallowed type");
+        psFree(polyOrd);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
 }
 
