Changeset 2961
- Timestamp:
- Jan 11, 2005, 1:39:41 PM (22 years ago)
- Location:
- trunk/psModules/test
- Files:
-
- 2 edited
-
tst_pmNonLinear.c (modified) (3 diffs)
-
verified/tst_pmNonLinear.stdout (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/test/tst_pmNonLinear.c
r2956 r2961 16 16 * @author GLG, MHPCC 17 17 * 18 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $19 * @date $Date: 2005-01-11 2 0:47:39$18 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 19 * @date $Date: 2005-01-11 23:39:41 $ 20 20 * 21 21 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 462 462 if(i==(NUM_ROWS-1) && j==(NUM_COLS-1)) { 463 463 if(actual != (tableSize-1)*2) { 464 printf("TEST ERROR: image[%d][%d] is %f, should be %f\n",i,j,actual,(tableSize-1)*2 );464 printf("TEST ERROR: image[%d][%d] is %f, should be %f\n",i,j,actual,(tableSize-1)*2.0); 465 465 } 466 466 } else { … … 469 469 testStatus = false; 470 470 } 471 } 472 } 473 } 474 475 test03Init(myReadout); 476 printf("------------------------------------------------------------\n"); 477 printf("Calling pmNonLinearityLookup() with image values not in vector.\n"); 478 myReadout->image->data.F32[0][0] = 0.5; 479 rc = pmNonLinearityLookup(myReadout, in, out); 480 if (rc == NULL) { 481 printf("TEST ERROR: pmNonLinearityPolynomial() returned a NULL psReadout\n"); 482 testStatus = false; 483 } 484 for (i=0;i<NUM_ROWS;i++) { 485 for (j=0;j<NUM_COLS;j++) { 486 psF32 expect = (float) (2 * (i + j)); 487 if(i==0 && j==0) { 488 expect = 1.0; 489 } 490 psF32 actual = rc->image->data.F32[i][j]; 491 if (FLT_EPSILON < fabs(expect - actual)) { 492 printf("TEST ERROR: image[%d][%d] is %f, should be %f\n", i, j, actual, expect); 493 testStatus = false; 471 494 } 472 495 } -
trunk/psModules/test/verified/tst_pmNonLinear.stdout
r2956 r2961 109 109 ------------------------------------------------------------ 110 110 Calling pmNonLinearityLookup() with one pixels outside inFlux range. Should generate warnings. 111 ------------------------------------------------------------ 112 Calling pmNonLinearityLookup() with image values not in vector. 111 113 112 114 ---> TESTPOINT PASSED (pmNonLinear{Testing bad input parameter conditions.} | tst_pmNonLinear.c)
Note:
See TracChangeset
for help on using the changeset viewer.
