Changeset 12513 for trunk/psLib/test/mathtypes
- Timestamp:
- Mar 19, 2007, 5:57:25 PM (19 years ago)
- Location:
- trunk/psLib/test/mathtypes
- Files:
-
- 6 edited
-
tap_psImage.c (modified) (12 diffs)
-
tap_psImageInterpolate.c (modified) (9 diffs)
-
tap_psScalar.c (modified) (5 diffs)
-
tap_psVector.c (modified) (13 diffs)
-
tap_psVectorSort_01.c (modified) (2 diffs)
-
tap_psVectorSort_02.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/mathtypes/tap_psImage.c
r12431 r12513 6 6 * @author Robert DeSonia, MHPCC 7 7 * 8 * @version $Revision: 1. 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2007-03- 14 00:39:51$8 * @version $Revision: 1.5 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-03-20 03:57:25 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 68 68 void testImageAlloc() 69 69 { 70 diag("testImageAlloc");70 // diag("testImageAlloc"); 71 71 72 72 psImage* image = NULL; … … 152 152 for (psS32 c=0;c<cols;c++) { 153 153 if (image->data.U16[r][c] != 2*c+r) { 154 diag("ERROR: Could not set all pixels in uint16 image at (%d,%d)",c,r);154 // diag("ERROR: Could not set all pixels in uint16 image at (%d,%d)",c,r); 155 155 errorFlag = true; 156 156 } … … 173 173 for (psS32 c=0;c<cols;c++) { 174 174 if (fabsf(image->data.F32[r][c] - (2.0f*c+r)) > FLT_EPSILON) { 175 diag("Could not set all pixels in float image at (%d,%d)",c,r);175 // diag("Could not set all pixels in float image at (%d,%d)",c,r); 176 176 errorFlag = true; 177 177 } … … 194 194 for (psS32 c=0;c<cols;c++) { 195 195 if (fabs(image->data.F64[r][c] - (2.0f*c+r)) > DBL_EPSILON) { 196 diag("Set all pixels in double image at (%d,%d)",c,r);196 // diag("Set all pixels in double image at (%d,%d)",c,r); 197 197 errorFlag = true; 198 198 } … … 216 216 for (psS32 c=0;c<cols;c++) { 217 217 if (image->data.U8[r][c] != (uint8_t)(r + c)) { 218 diag("Set all pixels in image (type=%d) at (%d,%d)", 219 type[t],c,r); 218 // diag("Set all pixels in image (type=%d) at (%d,%d)", type[t],c,r); 220 219 errorFlag = true; 221 220 } … … 250 249 // Testpoint #790 251 250 252 diag("testRegion");251 // diag("testRegion"); 253 252 254 253 psRegion region = psRegionSet(1,2,3,4); … … 271 270 void testRegion2() 272 271 { 273 diag("testRegion2");272 // diag("testRegion2"); 274 273 275 274 psImage *in; … … 297 296 void testRegion3() 298 297 { 299 diag("testRegion3");298 // diag("testRegion3"); 300 299 301 300 float X = 1; … … 312 311 void testImageInit() 313 312 { 314 diag("testImageInit");313 // diag("testImageInit"); 315 314 316 315 psImage *in1 = NULL; … … 346 345 void testImageSet() 347 346 { 348 diag("testImageSet");347 // diag("testImageSet"); 349 348 350 349 psImage *image = NULL; … … 462 461 void testImageGet() 463 462 { 464 diag("testImageGet");463 // diag("testImageGet"); 465 464 466 465 psImage *image = NULL; -
trunk/psLib/test/mathtypes/tap_psImageInterpolate.c
r9875 r12513 10 10 plan_tests(47); 11 11 12 diag("psImageInterpolate() tests");12 // diag("psImageInterpolate() tests"); 13 13 14 14 // very simple tests: no mask, bilinear mode, xramp image only … … 16 16 psMemId id = psMemGetId(); 17 17 18 diag ("interpolate a delta function");18 // diag ("interpolate a delta function"); 19 19 20 20 // generate simple image (x ramp) … … 31 31 ok_float (value, 1.0, "pixel center value - %f", value); 32 32 33 diag ("why do I need to have tolerances of 4epsilon or so??");33 // diag ("why do I need to have tolerances of 4epsilon or so??"); 34 34 value = psImagePixelInterpolate (image, 10.9, 10.5, NULL, 0, 0.0, PS_INTERPOLATE_BILINEAR); 35 35 ok_float_tol (value, 0.6, 4.0*FLT_EPSILON, "pixel value - %.20f", value); … … 51 51 psMemId id = psMemGetId(); 52 52 53 diag ("interpolate an x-ramp");53 // diag ("interpolate an x-ramp"); 54 54 55 55 // generate simple image (x ramp) … … 103 103 psMemId id = psMemGetId(); 104 104 105 diag ("interpolate a y-ramp: ");105 // diag ("interpolate a y-ramp: "); 106 106 107 107 // generate simple image (y ramp) … … 145 145 psMemId id = psMemGetId(); 146 146 147 diag ("interpolate an x-ramp (bicube)");147 // diag ("interpolate an x-ramp (bicube)"); 148 148 149 149 // generate simple image (x ramp) … … 177 177 ok_float (value, 2.8, "coord: 2.8, 2.8, value: %f", value); 178 178 179 diag ("coords outside of nominal range (1 < x < Nx - 2) return 'uncover'");179 // diag ("coords outside of nominal range (1 < x < Nx - 2) return 'uncover'"); 180 180 181 181 // no extrapolation: these return the 'uncover' value … … 199 199 psMemId id = psMemGetId(); 200 200 201 diag ("interpolate a y-ramp (bicube)");201 // diag ("interpolate a y-ramp (bicube)"); 202 202 203 203 // generate simple image (y ramp) … … 241 241 psMemId id = psMemGetId(); 242 242 243 diag ("interpolate a quadratic shape (bicube)");243 // diag ("interpolate a quadratic shape (bicube)"); 244 244 245 245 // generate simple image (x ramp) -
trunk/psLib/test/mathtypes/tap_psScalar.c
r12440 r12513 5 5 * @author Eric Van Alst, MHPCC 6 6 * 7 * @version $Revision: 1. 3$7 * @version $Revision: 1.4 $ 8 8 * $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-03- 14 21:21:49$9 * @date $Date: 2007-03-20 03:57:25 $ 10 10 * 11 11 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 64 64 void testScalarAlloc(void) 65 65 { 66 diag("psTestScalarAlloc");66 // diag("psTestScalarAlloc"); 67 67 68 68 //Verify the proper allocation/deallocation of scalar objects of valid types … … 82 82 void testBadScalarAlloc(void) 83 83 { 84 diag("psTestBadScalarAlloc");84 // diag("psTestBadScalarAlloc"); 85 85 86 86 // Verify return is null for invalid scalar type … … 92 92 void testScalarCopy(void) 93 93 { 94 diag("psTestScalarCopy");94 // diag("psTestScalarCopy"); 95 95 96 96 // Verify the proper copying of scalar objects for all valid types … … 110 110 void testBadScalarCopy(void) 111 111 { 112 diag("psTestBadScalarCopy");112 // diag("psTestBadScalarCopy"); 113 113 114 114 // Verify the return is null for invalid scalar type in the original -
trunk/psLib/test/mathtypes/tap_psVector.c
r12440 r12513 10 10 plan_tests(209); 11 11 12 diag("psVectorAlloc() tests");12 // diag("psVectorAlloc() tests"); 13 13 14 14 { … … 55 55 56 56 57 diag("psVectorRealloc() tests");57 // diag("psVectorRealloc() tests"); 58 58 59 59 { … … 153 153 } 154 154 155 diag("psVectorExtend() tests");155 // diag("psVectorExtend() tests"); 156 156 { 157 157 // create new psVector … … 217 217 218 218 219 diag("psVectorInit() tests");219 // diag("psVectorInit() tests"); 220 220 221 221 { … … 281 281 282 282 283 diag("psVectorCreate() tests");283 // diag("psVectorCreate() tests"); 284 284 285 285 { … … 399 399 400 400 401 diag("psVectorToString() tests");401 // diag("psVectorToString() tests"); 402 402 403 403 #define TEST_VECTOR_TO_STRING(TYPE, SIZE, START, INC, EXPECTED) \ … … 439 439 440 440 441 diag("p_psVectorGetElementF64() tests");441 // diag("p_psVectorGetElementF64() tests"); 442 442 443 443 #define TEST_VECTOR_GET_ELEMENT_F64(ELEM_TYPE, SIZE, VALUE_TYPE, \ … … 477 477 478 478 479 diag("p_psVectorPrint() tests");479 // diag("p_psVectorPrint() tests"); 480 480 // XXX: Why are we testing private functions? 481 481 #define TEST_VECTOR_PRINT(ELEM_TYPE, SIZE, VALUE_TYPE, INIT_VALUE, FD, \ … … 513 513 TEST_VECTOR_PRINT(PS_TYPE_F64,2, psF64, -123.123, 1, "PS_TYPE_F64", TRUE); 514 514 515 diag("psVectorSet() tests");515 // diag("psVectorSet() tests"); 516 516 517 517 { … … 543 543 544 544 545 diag("psVectorGet() tests");545 // diag("psVectorGet() tests"); 546 546 547 547 { … … 566 566 567 567 568 diag("psVectorCountPixelMask() tests");568 // diag("psVectorCountPixelMask() tests"); 569 569 570 570 { … … 605 605 606 606 607 diag("psVectorLength() tests");607 // diag("psVectorLength() tests"); 608 608 { 609 609 psVector *vector = psVectorAlloc(5, PS_TYPE_F32); … … 647 647 648 648 649 diag("psVectorCopy() tests");649 // diag("psVectorCopy() tests"); 650 650 651 651 { -
trunk/psLib/test/mathtypes/tap_psVectorSort_01.c
r11265 r12513 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $15 * @date $Date: 2007-0 1-24 22:14:48$14 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2007-03-20 03:57:25 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 26 26 27 27 #define tstVectorSortByType(datatype,value) \ 28 diag( "tstVectorSortByType_" #datatype ); \29 28 in = psVectorAlloc(7,PS_TYPE_##datatype); \ 30 29 in->n = 7; \ -
trunk/psLib/test/mathtypes/tap_psVectorSort_02.c
r11265 r12513 14 14 * @author Ross Harman, MHPCC 15 15 * 16 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $17 * @date $Date: 2007-0 1-24 22:14:48$16 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2007-03-20 03:57:25 $ 18 18 * 19 19 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 27 27 28 28 #define tstVectorSortIndexByType(datatype,value) \ 29 diag( "tstVectorSortIndexByType_" #datatype ); \30 29 in = psVectorAlloc( 5, PS_TYPE_##datatype ); \ 31 30 in->n = 5; \
Note:
See TracChangeset
for help on using the changeset viewer.
