Changeset 5137 for trunk/psLib/test/mathtypes
- Timestamp:
- Sep 26, 2005, 12:35:54 PM (21 years ago)
- Location:
- trunk/psLib/test/mathtypes
- Files:
-
- 2 edited
-
tst_psVector.c (modified) (4 diffs)
-
verified/tst_psVector.stderr (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/mathtypes/tst_psVector.c
r5118 r5137 14 14 * @author Ross Harman, MHPCC 15 15 * 16 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-09-2 4 01:33:12$16 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-09-26 22:35:54 $ 18 18 * 19 19 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 30 30 static psS32 testVectorCreate(void); 31 31 static psS32 testVectorGetSet(void); 32 static psS32 testVectorCountPixelMask(void); 32 33 33 34 testDescription tests[] = { … … 38 39 {testVectorCreate,-5,"psVectorCreate",0,false}, 39 40 {testVectorGetSet,-6,"psVectorGet/Set",0,false}, 41 {testVectorCountPixelMask,-7,"psVectorCountPixelMask",0,false}, 40 42 {NULL} 41 43 }; … … 414 416 } 415 417 416 417 418 psS32 testVectorCountPixelMask(void) 419 { 420 long numPix = 0; 421 long numPix2 = 0; 422 psVector *vec = NULL; 423 numPix = psVectorCountPixelMask(vec, 1); 424 425 if (numPix != -1) { 426 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 427 "psVectorCountPixelMask failed to return -1 for NULL Vector input.\n"); 428 return 1; 429 } 430 431 numPix = 0; 432 vec = psVectorAlloc(5, PS_TYPE_S32); 433 psVector *vec2 = NULL; 434 vec2 = psVectorAlloc(5, PS_TYPE_U8); 435 vec->data.S32[0] = 0; 436 vec->data.S32[1] = 1; 437 vec->data.S32[2] = 0; 438 vec->data.S32[3] = 1; 439 vec->data.S32[4] = 0; 440 vec2->data.U8[0] = 0; 441 vec2->data.U8[1] = 1; 442 vec2->data.U8[2] = 0; 443 vec2->data.U8[3] = 1; 444 vec2->data.U8[4] = 0; 445 numPix = psVectorCountPixelMask(vec, 1); 446 numPix2 = psVectorCountPixelMask(vec2, 1); 447 448 if (numPix != -1) { 449 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 450 "psVectorCountPixelMask failed to return -1 for wrong type of Vector input.\n"); 451 return 2; 452 } 453 if (numPix2 == -1) { 454 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 455 "psVectorCountPixelMask returned -1 for correct Vector input\n"); 456 return 3; 457 } 458 if (numPix2 != 2) { 459 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 460 "psVectorCountPixelMask returned incorrect pixel count %d\n", numPix2); 461 return 4; 462 } 463 464 psFree(vec); 465 psFree(vec2); 466 return 0; 467 } 468 -
trunk/psLib/test/mathtypes/verified/tst_psVector.stderr
r5114 r5137 69 69 ---> TESTPOINT PASSED (psVector{psVectorGet/Set} | tst_psVector.c) 70 70 71 /***************************** TESTPOINT ******************************************\ 72 * TestFile: tst_psVector.c * 73 * TestPoint: psVector{psVectorCountPixelMask} * 74 * TestType: Positive * 75 \**********************************************************************************/ 76 77 <DATE><TIME>|<HOST>|E|psVectorCountPixelMask (FILE:LINENO) 78 The input psVector can not be NULL. 79 <DATE><TIME>|<HOST>|E|psVectorCountPixelMask (FILE:LINENO) 80 Input psVector is an unsupported type (0x104). 81 82 ---> TESTPOINT PASSED (psVector{psVectorCountPixelMask} | tst_psVector.c) 83
Note:
See TracChangeset
for help on using the changeset viewer.
