Index: trunk/psLib/test/math/tap_psSpline1D.c
===================================================================
--- trunk/psLib/test/math/tap_psSpline1D.c	(revision 10945)
+++ trunk/psLib/test/math/tap_psSpline1D.c	(revision 13124)
@@ -13,6 +13,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2007-01-06 00:48:54 $
+*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2007-05-02 04:20:06 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -257,6 +257,6 @@
     psLogSetFormat("HLNM");
     psLogSetLevel( PS_LOG_INFO );
-
-    plan_tests(24);
+    plan_tests(28);
+
     // psSplineAllocTest()
     {
@@ -270,5 +270,4 @@
         ok(tmpSpline->p_psDeriv2 == NULL, "psSpline1DAlloc() properly set the psSpline1D->p_psDeriv2 member");
         psFree(tmpSpline);
-
         skip_end();
         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
@@ -282,4 +281,40 @@
         ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
     }
+
+    // Verify psSpline1DEval() for NULL input
+    // Verify with spline->n==0, and spline->knots PS_TYPE_F64
+    {
+        psMemId id = psMemGetId();
+        float y = psSpline1DEval(NULL, 0.0);
+        ok(isnan(y), "psSpline1DEval() returned NAN will NULL input spline");
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
+
+
+    // Verify psSpline1DEvalVector() for NULL input spline
+    {
+        psMemId id = psMemGetId();
+        psVector *x = psVectorAlloc(10, PS_TYPE_F32);
+        psVector *y = psSpline1DEvalVector(NULL, x);
+        ok(y == NULL, "psSpline1DEvalVector() returned NAN will NULL input spline");
+        psFree(x);
+        psFree(y);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
+
+
+    // Verify psSpline1DEvalVector() for NULL input vector
+    // XXX: Move this where we have a good spline.  It currently fails because
+    // were calling it with an un-fully-allocated one.
+    if (0) {
+        psMemId id = psMemGetId();
+        psSpline1D *tmpSpline = psSpline1DAlloc();
+        psVector *y = psSpline1DEvalVector(tmpSpline, NULL);
+        ok(y == NULL, "psSpline1DEvalVector() returned NAN will NULL input vector");
+        psFree(tmpSpline);
+        psFree(y);
+        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
+    }
+
 
     ok(genericF32Test(1, myFunc00, false), "Generic, simple mapping, F32 test. 1 spline");
