Changeset 13124 for trunk/psLib/test/math/tap_psSpline1D.c
- Timestamp:
- May 1, 2007, 6:20:06 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/test/math/tap_psSpline1D.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/math/tap_psSpline1D.c
r10945 r13124 13 13 * @author GLG, MHPCC 14 14 * 15 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $16 * @date $Date: 2007-0 1-06 00:48:54$15 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2007-05-02 04:20:06 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 257 257 psLogSetFormat("HLNM"); 258 258 psLogSetLevel( PS_LOG_INFO ); 259 260 plan_tests(24); 259 plan_tests(28); 260 261 261 // psSplineAllocTest() 262 262 { … … 270 270 ok(tmpSpline->p_psDeriv2 == NULL, "psSpline1DAlloc() properly set the psSpline1D->p_psDeriv2 member"); 271 271 psFree(tmpSpline); 272 273 272 skip_end(); 274 273 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); … … 282 281 ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks"); 283 282 } 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 284 319 285 320 ok(genericF32Test(1, myFunc00, false), "Generic, simple mapping, F32 test. 1 spline");
Note:
See TracChangeset
for help on using the changeset viewer.
