Changeset 6500 for trunk/psLib/test/mathtypes
- Timestamp:
- Feb 27, 2006, 4:53:03 PM (20 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
r6484 r6500 14 14 * @author Ross Harman, MHPCC 15 15 * 16 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $17 * @date $Date: 2006-02-2 4 23:43:16$16 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2006-02-28 02:53:03 $ 18 18 * 19 19 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 33 33 static psS32 testVectorGetSet(void); 34 34 static psS32 testVectorCountPixelMask(void); 35 static psS32 testVectorLength(void); 35 36 36 37 testDescription tests[] = { … … 44 45 {testVectorGetSet,-8,"psVectorGet/Set",0,false}, 45 46 {testVectorCountPixelMask,-9,"psVectorCountPixelMask",0,false}, 47 {testVectorLength,666,"psVectorLength",0,false}, 46 48 {NULL} 47 49 }; … … 548 550 } 549 551 552 psS32 testVectorLength( void ) 553 { 554 psVector *vector = psVectorAlloc(5, PS_TYPE_F32); 555 556 if (psVectorLength(vector) != 0) { 557 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 558 "psVectorLength failed to return the correct length of vector.\n"); 559 return 1; 560 } 561 vector->n = 5; 562 if (psVectorLength(vector) != 5) { 563 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 564 "psVectorLength failed to return the correct length of vector.\n"); 565 return 2; 566 } 567 vector->n++; 568 if (psVectorLength(vector) != 6) { 569 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 570 "psVectorLength failed to return the correct length of vector.\n"); 571 return 3; 572 } 573 psFree(vector); 574 575 psVector *emptyVector = NULL; 576 psArray *array = psArrayAlloc(5); 577 578 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 579 if (psVectorLength(emptyVector) != -1) { 580 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 581 "psVectorLength failed to return -1 for a NULL input vector.\n"); 582 return 4; 583 } 584 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 585 if (psVectorLength((psVector*)array) != -1) { 586 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 587 "psVectorLength failed to return -1 for an invalid input vector.\n"); 588 return 5; 589 } 590 psFree(array); 591 592 return 0; 593 } 594 -
trunk/psLib/test/mathtypes/verified/tst_psVector.stderr
r6484 r6500 108 108 ---> TESTPOINT PASSED (psVector{psVectorCountPixelMask} | tst_psVector.c) 109 109 110 /***************************** TESTPOINT ******************************************\ 111 * TestFile: tst_psVector.c * 112 * TestPoint: psVector{psVectorLength} * 113 * TestType: Positive * 114 \**********************************************************************************/ 115 116 <HOST>|I|testVectorLength 117 Following should generate error message 118 <HOST>|E|psVectorLength (FILE:LINENO) 119 Error: Specified vector is not a valid psVector 120 <HOST>|I|testVectorLength 121 Following should generate error message 122 <HOST>|E|psVectorLength (FILE:LINENO) 123 Error: Specified vector is not a valid psVector 124 125 ---> TESTPOINT PASSED (psVector{psVectorLength} | tst_psVector.c) 126
Note:
See TracChangeset
for help on using the changeset viewer.
