Changeset 5647
- Timestamp:
- Nov 30, 2005, 3:20:38 PM (21 years ago)
- Location:
- trunk/psLib/test/math
- Files:
-
- 2 edited
-
tst_psSpline1D.c (modified) (7 diffs)
-
verified/tst_psSpline1D.stdout (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/math/tst_psSpline1D.c
r5546 r5647 13 13 * @author GLG, MHPCC 14 14 * 15 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $16 * @date $Date: 2005-1 1-18 20:04:38 $15 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2005-12-01 01:20:38 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 28 28 // {testFunction, testpointNumber, description, expected rc, boolean-ignore this test} 29 29 testDescription tests[] = { 30 {psSplineAllocTest, 0000, "(TEST A) psSplineAllocTest",true, false},31 {psSplineEvalTest, 0000, "(TEST B) psSplineEvalTest",true, false},30 {psSplineAllocTest, 0000, "(TEST A) psSplineAllocTest", true, false}, 31 {psSplineEvalTest, 0000, "(TEST B) psSplineEvalTest", true, false}, 32 32 {psSplineEvalVectorTest, 0000, "(TEST C) psSplineEvalVectorTest", true, false}, 33 33 {NULL} … … 40 40 otherwise it returns TRUE. 41 41 ********************************************************************************/ 42 psBool CheckErrorF32(psF32 actual, 43 psF32 expect) 42 psBool CheckErrorF32( 43 psF32 actual, 44 psF32 expect) 44 45 { 45 46 if ((fabs(actual - expect) / fabs(expect)) > ERROR_TOLERANCE_PERCENT) { … … 50 51 } 51 52 52 psS32 main( psS32 argc, char* argv[] ) 53 psS32 main( 54 psS32 argc, 55 char* argv[]) 53 56 { 54 57 psLogSetFormat("HLNM"); 55 58 psLogSetLevel( PS_LOG_INFO ); 56 59 // 57 // Set the following trace le evls to track what is happening in the60 // Set the following trace levels to track what is happening in the 58 61 // various functions in psSpline.c 59 62 // … … 113 116 testStatus = false; 114 117 } 118 /* 119 XXX: Must allocate these members. 120 tmpSline->spline = (psPolynomial1D **) psAlloc(numSplines * sizeof(psPolynomial1D *)); 121 for (psS32 i=0;i<numSplines;i++) { 122 spline->spline[i] = psPolynomial1DAlloc(3, PS_POLYNOMIAL_ORD); 123 } 124 */ 115 125 116 126 psFree(tmpSpline); … … 197 207 } 198 208 199 200 209 tmpSpline = psVectorFitSpline1D(xF32, yF32); 201 210 if (tmpSpline == NULL) { 202 printf("TEST ERROR: Could not allocate psSpline1D data structure \n");211 printf("TEST ERROR: Could not allocate psSpline1D data structure (1)\n"); 203 212 testStatus = false; 204 213 } … … 712 721 psS32 testStatus = psSplineEvalTest_sub(10); 713 722 714 // HEY 715 testStatus |= psSplineEvalTest_sub00(0);716 testStatus |= psSplineEvalTest_sub00b(0);717 testStatus |= psSplineEvalTest_sub00c(0);723 // HEY: XXX: Test with empty psVectors. 724 // testStatus |= psSplineEvalTest_sub00(0); 725 // testStatus |= psSplineEvalTest_sub00b(0); 726 // testStatus |= psSplineEvalTest_sub00c(0); 718 727 719 728 testStatus |= psSplineEvalTest_sub00(1); -
trunk/psLib/test/math/verified/tst_psSpline1D.stdout
r5183 r5647 5 5 simple x->y mapping (defined by myFunc00()). We do this for both F32 6 6 and F64 versions of the input x and y vectors. 7 Number of splines: 1 8 Performing the F32 test.... 9 Performing the F64 test.... 7 10 8 11 psSplineEvalTest_sub00b(): We test the psVectorFitSpline1D, psSpline1DEval() functions with a 9 12 more complicated x->y mapping (defined by myFunc00b()). We do this for 10 13 both F32 and F64 versions of the input x and y vectors. 14 Number of splines: 1 15 Performing the F32 test.... 16 Performing the F64 test.... 11 17 12 18 psSplineEvalTest_sub00c(): This is similar to psSplineEvalTest_sub00b() 13 19 except that the x vector is NULL. 20 Number of splines: 1 21 Performing the F32 test.... 22 Performing the F64 test.... 23 24 psSplineEvalTest_sub00(): We test the psVectorFitSpline1D, psSpline1DEval() functions with a very 25 simple x->y mapping (defined by myFunc00()). We do this for both F32 26 and F64 versions of the input x and y vectors. 27 Number of splines: 95 28 Performing the F32 test.... 29 Performing the F64 test.... 30 31 psSplineEvalTest_sub00b(): We test the psVectorFitSpline1D, psSpline1DEval() functions with a 32 more complicated x->y mapping (defined by myFunc00b()). We do this for 33 both F32 and F64 versions of the input x and y vectors. 34 Number of splines: 95 35 Performing the F32 test.... 36 Performing the F64 test.... 37 38 psSplineEvalTest_sub00c(): This is similar to psSplineEvalTest_sub00b() 39 except that the x vector is NULL. 40 Number of splines: 95 41 Performing the F32 test.... 42 Performing the F64 test.... 43 Performing the F32 test.... 14 44 Testing psSpline1DEvalVector() with an F32 vector. 15 45 Testing psSpline1DEvalVector() with an F64 vector.
Note:
See TracChangeset
for help on using the changeset viewer.
